A full-stack todo list application built with a modern tech stack, featuring user authentication, task management, and a scalable deployment setup. Deployable anywhere—local machines, Codespaces, or EC2 instances—thanks to Docker and a flexible architecture.
- User Authentication: Register and login securely.
- Task Management: Add, toggle, and delete todos.
- Responsive UI: Clean, modern design with Material-UI.
- Scalable Deployment: Runs seamlessly with Docker Compose.
- Cross-Environment: Works locally, in Codespaces, or on cloud instances like EC2.
SBMRD-Todo/
├── backend/ # Spring Boot backend
│ ├── src/ # Java source code
│ ├── Dockerfile # Backend container definition
│ └── pom.xml # Maven dependencies
├── frontend/ # React frontend
│ ├── src/ # React source code (components, etc.)
│ ├── public/ # Static assets
│ ├── Dockerfile # Frontend container definition
│ └── package.json # Node dependencies
├── nginx.conf # Nginx configuration for proxying
├── docker-compose.yml # Multi-container orchestration
└── README.md # Project documentation
- Docker and Docker Compose
- Node.js (for local frontend development)
- Java 17 and Maven (for local backend development)
-
Clone the Repository
git clone https://github.com/yourusername/SBMRD-Todo.git cd SBMRD-Todo
-
Run with Docker Compose
docker compose up --build
- Access the app at
http://localhost:80/login
(or your EC2 public IP, e.g.,http://54.210.66.219/login
).
- Access the app at
-
Local Development (Optional)
- Backend:
cd backend mvn clean spring-boot:run
- Frontend:
cd frontend npm install npm start
- Access at
http://localhost:3000/login
.
- Access at
- Backend:
- SSH into your EC2 instance.
- Copy the project folder:
scp -r SBMRD-Todo ec2-user@<ec2-public-ip>:/home/ec2-user/
- Install Docker and Docker Compose on EC2:
sudo yum update -y sudo yum install docker -y sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose sudo systemctl start docker
- Run:
cd SBMRD-Todo docker compose up --build
- Update Security Group:
- Allow inbound TCP on port
80
from0.0.0.0/0
.
- Allow inbound TCP on port
- Open in GitHub Codespaces.
- Run
docker compose up --build
. - Forward port
80
in the "Ports" tab. - Access via the forwarded URL (e.g.,
https://<your-codespace>-80.app.github.dev/login
).
- Open the app in your browser.
- Register with a username (e.g.,
teste
) and password (e.g.,pass123
). - Log in to manage your todos:
- Add tasks.
- Toggle completion.
- Delete tasks.
To list registered users in MongoDB:
docker compose exec mongo mongosh
use todo_db
db.users.find()
- Fork the repository.
- Create a feature branch (
git checkout -b feature/xyz
). - Commit changes (
git commit -m "Add xyz feature"
). - Push to the branch (
git push origin feature/xyz
). - Open a Pull Request.
- Icons by Shields.io.
- Inspired by modern full-stack tutorials.
Happy coding! 🚀