This is a collection of applications I am working on in the process of learning the intricacies of Ruby on Rails. Parts of this are intentionally over-engineered for the purpose of learning how to configure and work with certain gems.
This project uses the standard MVC structure with Models, Controllers, and Views.
The Models are all associated with tables in the database using Active Record. The database is currently managed with the default SQLite interface.
Currently, there are two models:
User: Users who have logged in. Stores the User's email address.Entry: Notes created in the Todo Manager. Stores each note's message, due date, and priority.
The controllers handle HTTP requests of various types
Currently, there are two controllers along with the base controller
Entries: Handles GET operations for theEntrymodel.Sessions: Handles log in and log out endpoints.Application: Base controller. Forces authentication and gets the active user for other controllers to use
- Add a
Userscontroller to allow a user to manage their account
The views display the rendered HTML for a given controller's response.
The HTML is styled and made interactive with the Bootstrap CSS toolkit.
- Make it look better
This application has two ways it can be run, with slightly different features available in each
- Standard way: run
bin/rails server -b 127.0.0.1 -p 3000 -e developmentin the root of this project using a Linux command line - Docker Compose: If you have Docker Desktop installed,
run
docker compose up --build -d
In the standard method, the application runs as a standalone instance. It uses OmniAuth's pass through authentication, a local Sqlite database as its database, and no way to view emails the application has sent.
In the containerized Docker Compose method, the application runs with a suite of support services.
The application itself is available at localhost:3000.
Keycloak OIDC provider is available at localhost:8888, and the application authenticates against it using an OIDC plugin for OmniAuth.
A Postgres database is available at localhost:5432 and is used by Keycloak (plan to use with the application as well).
A fake SMTP server is available at localhost:4040. This receives all emails sent by the application and displays them.
- Make the application send emails
- Configure SonarQube and SonarScan static code analysis to run on Docker Compose