A full-stack Todo List application with a Flask backend and modern frontend, featuring comprehensive testing and CI/CD integration.
-
Backend (Flask + SQLite)
- RESTful API with CRUD operations
- SQLite database for data persistence
- Comprehensive error handling
- Health check endpoint
- Detailed logging
-
Frontend
- Clean and responsive UI
- Real-time updates
- Error handling and user feedback
- Modern CSS styling
-
Testing
- Unit tests with pytest
- Integration tests
- API tests with comprehensive coverage
- Smoke tests
- Test result reporting
| Method | Endpoint | Description |
|---|---|---|
| GET | /todos |
List all todos |
| POST | /todos |
Create a new todo |
| GET | /todos/{id} |
Get a specific todo |
| PUT | /todos/{id} |
Update a todo |
| DELETE | /todos/{id} |
Delete a todo |
| GET | /health |
Health check endpoint |
todo-api/
├── backend/
│ ├── app.py # Flask application
│ ├── requirements.txt # Python dependencies
│ └── tests/ # Test files
├── frontend/
│ ├── index.html # Main HTML file
│ ├── style.css # Styles
│ └── script.js # Frontend logic
├── .github/
│ └── workflows/ # GitHub Actions workflows
├── assets/
│ ├── API_test.png # API test results
│ └── coverage.png # Coverage report
└── docker/
├── Dockerfile # Production container
└── docker-compose.yml # Development setup
-
Clone the Repository
git clone https://github.com/HemrajShelke/todo-api.git cd todo-api -
Set Up Backend
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Run the Application
python app.py
-
Run Tests
# Run all tests pytest tests/ # Run API tests python test_api_with_keploy.py
-
Backend Development
cd backend flask run --debug -
Run Tests with Coverage
pytest --cov=. tests/
The project includes three GitHub Actions workflows:
-
CI/CD Pipeline (
ci-cd.yml)- Builds and tests the application
- Runs integration tests
- Deploys to production (on main branch)
-
API Testing (
api-test.yml)- Runs comprehensive API tests
- Generates test reports
- Collects test artifacts
-
Keploy Testing (
keploy.yml)- Runs Keploy-specific tests
- Records API interactions
- Validates against recorded tests
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
