Skip to content

salimdotpy/task-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🧩 Task Manager App

A full-stack Task Management application built with:

  • Backend: FastAPI, SQLAlchemy, MySQL, Pydantic, Pytest
  • Frontend: React (Vite), Material Tailwind, Axios, React Hook Form, Yup

App Screenshot


🚀 Features

✅ Create, update, delete, and list tasks
✅ Mark tasks as completed or pending
✅ RESTful API with Pydantic validation
✅ Modern React interface with Material Tailwind
✅ Fully tested backend (Pytest + SQLite test DB)


⚙️ Backend Setup (FastAPI)

1️⃣ Create a virtual environment

   cd backend
   python -m venv venv
   venv\Scripts\activate    # On Windows
   source venv/bin/activate # On macOS/Linux

2️⃣ Install dependencies

   pip install -r requirements.txt

3️⃣ Configure environment variables

Copy .env.example → .env and update your database credentials:

   DATABASE_URL=mysql+mysqlconnector://root:password@localhost/task_db

4️⃣ Run the server

uvicorn app.main:app --reload

The API will be available at http://127.0.0.1:8000

5️⃣ API Documentation


🧪 Testing the Backend

Run all unit tests with coverage:

   pytest -v

Example output: tests/test_tasks.py::test_create_task PASSED [ 20%] tests/test_tasks.py::test_list_tasks PASSED [ 40%] tests/test_tasks.py::test_update_task PASSED [ 60%] tests/test_tasks.py::test_delete_task PASSED [ 80%] tests/test_tasks.py::test_delete_nonexistent_task PASSED [100%]

========================================= 5 passed in 8.42s =========================================


💻 Frontend Setup (React + Vite)

1️⃣ Install dependencies

cd frontend
npm install

2️⃣ Configure Axios base URL

In src/api/axios.js:

import axios from "axios";

export default axios.create({
  baseURL: "http://127.0.0.1:8000",
});

3️⃣ Start the development server

npm run dev

The app will run at http://localhost:5173

📸 Screenshots

Index Page

Index Page

Add Task Modal

Add Task Modal

Update Task Modal

Update Task Modal

Delete Task Modal

Delete Task Modal

🤝 Contributing

Contributions, suggestions, and improvements are welcome! Feel free to open an issue or submit a pull request.

👨‍💻 Author

About

A full-stack task management application built with FastAPI, React (Vite), and MySQL. It provides a RESTful API, modern UI, and complete CRUD functionality for tasks, and tested with Pytest

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors