A web application for tracking pushups throughout the month of March. Users can register, log their daily pushups, view leaderboards, and track their progress with charts.
- User Registration & Authentication: Simple username/password registration and login
- Pushup Tracking: Enter pushups for any date in March (not future dates)
- Leaderboard: See rankings of all participants
- Progress Charts: Visualize your pushup progress over time
- Entry Management: Edit or delete previous entries
- Backend: FastAPI (Python 3.11)
- Database: PostgreSQL 15
- Frontend: Server-rendered HTML with Jinja2 templates
- Styling: Porto HTML5 theme
- Deployment: Docker Compose
- Docker and Docker Compose installed
- Port 8090 available (or configure a different port)
- Clone the repository:
cd march-pushups- Create a
.envfile (optional, defaults are provided):
POSTGRES_USER=pushups
POSTGRES_PASSWORD=pushups_pass
POSTGRES_DB=pushups_db
SECRET_KEY=your-secret-key-here
PORT=8090
ENVIRONMENT=development- Start the application:
docker-compose up -d- Access the application:
- Open your browser to
http://localhost:8090 - Register a new account or login
The database tables are automatically created on first startup. If you need to run migrations manually:
docker-compose exec backend alembic upgrade headmarch-pushups/
├── backend/
│ ├── app/
│ │ ├── routes/ # API routes
│ │ ├── templates/ # Jinja2 templates
│ │ ├── static/ # Static files (CSS, JS, themes)
│ │ ├── models.py # SQLAlchemy models
│ │ ├── schemas.py # Pydantic schemas
│ │ ├── auth.py # Authentication utilities
│ │ ├── db.py # Database configuration
│ │ └── main.py # FastAPI application
│ ├── alembic/ # Database migrations
│ ├── Dockerfile
│ └── requirements.txt
├── docker-compose.yml
└── README.md
POST /api/auth/register- Register a new userPOST /api/auth/login- LoginGET /api/auth/me- Get current user infoPOST /api/auth/logout- Logout
GET /api/pushups/- Get user's pushup entriesPOST /api/pushups/- Create a new entryPUT /api/pushups/{id}- Update an entryDELETE /api/pushups/{id}- Delete an entryGET /api/pushups/all- Get all entries (for dashboard)
GET /api/dashboard/stats- Get dashboard statistics and leaderboardGET /api/dashboard/user/{id}/stats- Get specific user stats
- Install dependencies:
cd backend
pip install -r requirements.txt-
Set up PostgreSQL database
-
Set environment variables:
export DATABASE_URL=postgresql://pushups:pushups_pass@localhost:5432/pushups_db
export SECRET_KEY=your-secret-key- Run migrations:
alembic upgrade head- Start the server:
uvicorn app.main:app --reload- The application tracks pushups specifically for March (March 1-31 of the current year)
- Users cannot enter pushups for future dates
- Each user can only have one entry per date
- The leaderboard shows total pushups, days active, and average per day
- All dates are stored in Eastern Time (US/Eastern)
This project is for personal use.