Todo list application built using Rails & React.
The Rails API utilizes Ruby 3.3.5 and Rails 7. The React frontend requires NodeJS and was developed using Version 20. You should ensure you have these installed on your machine before attempting to run this project. There are idiomatic version files in each directory.
A Docker Compose stack is also utilized for local infrastructure and both the frontend and backend are deployed using Dockerfiles. It's expected that you have Docker installed on your machine.
- Clone the repo
- Navigate to backend directory
cd ./todos/backend
- Copy example .env file
.example.env .env
- Ensure environment variables are exported. I like direnv
- Stand up your local infrastructure (Postgres)
docker-compose up -d
- Run a Bundle install
bundle install
- Run DB Migrations
rails db:migrate
- Start the Rails server
rails s
- In a new terminal navigate to the
frontend
directorycd ./todos/frontend
- Install dependencies
npm install
- Start the client
npm run dev
If all went well, you should be presented with a localhost address which you can navigate to and begin developing on the app.
This app is deployed on Railway. Prod deploys take place with changes on the main
branch. A watcher is in place to deploy the frontend and/or backend respectively based on which files have changed. The front end build is a static file distribution served via a Caddy server.