An open API service indexing awesome lists of open source software.

https://github.com/thamiraweerakoon/todo-web-application


https://github.com/thamiraweerakoon/todo-web-application

docker fullstack java mysql spring-boot todo-app webapp

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# ๐Ÿ“ Todo App โ€” Full Stack (Java + MySQL + Docker)

A simple, modern full-stack Todo Application built with:

- ๐Ÿ”ง Java 17 & Spring Boot 3
- ๐Ÿ›ข MySQL (Dockerized)
- ๐ŸŒ HTML/CSS/JS (Vanilla)
- ๐Ÿณ Docker & Docker Compose

---

## ๐Ÿš€ Features

- Add and manage tasks
- Top 5 recent incomplete tasks listed
- Mark tasks as done
- REST API built with Spring Boot
- MySQL-backed persistence layer
- Fully containerized (backend + frontend + db)

---

## ๐Ÿ“ฆ Project Structure

```bash
todo-app/
โ”œโ”€โ”€ backend/ # Spring Boot API
โ”œโ”€โ”€ frontend/ # HTML/CSS/JS UI
โ”œโ”€โ”€ db/ # SQL init (optional)
โ”œโ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ .gitignore
```

---

## ๐Ÿ›  Setup & Run

### ๐Ÿ” Prerequisites
- [Docker](https://docs.docker.com/get-docker/)
- Optional: [Java 17](https://adoptium.net/) and [Maven](https://maven.apache.org/) (for local dev)

### โ–ถ๏ธ Run with Docker Compose

```bash
docker-compose up --build
```

Then access:
- Frontend: [http://localhost:3000](http://localhost:3000)
- API: [http://localhost:8080/api/tasks](http://localhost:8080/api/tasks)

---

## โœ… API Endpoints

| Method | Endpoint | Description |
|--------|--------------------------|--------------------------|
| GET | `/api/tasks` | Get top 5 recent tasks |
| POST | `/api/tasks` | Create a new task |
| PUT | `/api/tasks/{id}/complete` | Mark task as completed |

---

## ๐Ÿงช Testing

### Run Unit & Integration Tests

If Maven is installed:
```bash
cd backend
mvn test
```

Or run tests via Docker:
```bash
docker run --rm -v "$PWD/backend":/app -w /app maven:3.9.6-eclipse-temurin-17 mvn test
```

---

## ๐Ÿ“š Tech Stack

- Java 17, Spring Boot
- MySQL 8
- HTML/CSS/JS
- Docker + Docker Compose
- JUnit 5, Mockito

---

## ๐Ÿค Contributing

Pull requests welcome. For major changes, please open an issue first.

---

## ๐Ÿ™‹โ€โ™‚๏ธ Author

Developed by [Thamira Weerakoon] โ€” [LinkedIn](https://www.linkedin.com/in/thamira-weerakoon-bb43522a4/) | [GitHub](https://github.com/ThamiraWeerakoon)