Perfect 👍
Below is a clean, professional, interview-ready README.md for your project.
You can copy–paste this directly into a README.md file at the project root.
# 📅 Calendar & Leave Management System (FastAPI)
A full-stack calendar application built using **FastAPI**, **Python Calendar library**, and **Vanilla JavaScript**, featuring a **secure admin panel** to manage holidays, colors, and calendar configuration dynamically.
---
## 🚀 Features
### 👤 User Side
- View full year calendar (current year → next 10 years)
- Automatically highlights:
- Saturdays
- Sundays
- Holidays
- Hover on holidays to see holiday name
- Working Day & Leave Calculator:
- Select working weekdays
- Add sick leave, casual leave, holidays
- Add yearly short leave (in hours)
- Calculates net working days
- Accurate leap-year handling (Python calendar)
---
### 🔐 Admin Panel
- Secure admin login (session-based authentication)
- Add / remove holidays dynamically
- Manage colors for:
- Sunday
- Saturday
- Holiday
- Changes reflect instantly on user calendar
- Logout functionality
- Configuration stored centrally (JSON)
---
## 🛠 Tech Stack
### Backend
- **FastAPI**
- **Python 3.13**
- `calendar` module
- Session middleware (Starlette)
### Frontend
- HTML + CSS
- Vanilla JavaScript
- Fetch API
### Security
- Session-based authentication
- Protected admin routes
- Server-side access control
---
## 📂 Project Structure
```bash
project/
├── app.py
├── data/
│ └── holidays.json
├── static/
│ ├── css/
│ │ ├── style.css
│ │ ├── admin.css
│ │ └── login.css
│ └── js/
│ ├── script.js
│ └── admin.js
├── templates/
│ ├── index.html
│ ├── admin.html
│ └── login.html
├── requirements.txt
└── README.mdgit clone <repo-url>
cd projectpython -m venv myvenv
source myvenv/bin/activate # macOS/Linux
myvenv\Scripts\activate # Windowspip install -r requirements.txtpython -m uvicorn app:app --reload| Feature | URL |
|---|---|
| User Calendar | http://127.0.0.1:8000 |
| Admin Login | http://127.0.0.1:8000/login |
| Admin Panel | http://127.0.0.1:8000/admin |
| Logout | http://127.0.0.1:8000/logout |
Username: admin
Password: admin123
⚠️ Change credentials & enable hashing before production use.
-
Working days counted based on selected weekdays
-
Weekends and holidays are visual only
-
Short leave:
- 8 hours = 1 working day
-
Final calculation:
Net Working Days =
Total Working Days
- Sick Leave
- Casual Leave
- Holidays
- Short Leave (converted to days)
-
Backend is the single source of truth
-
UI changes do not affect business logic
-
Admin controls configuration without code changes
-
Clear separation of:
- UI
- Logic
- Configuration
- Security
- Password hashing (bcrypt)
- Role-based access
- Database support (PostgreSQL / SQLite)
- Company-wise calendars
- Export reports (PDF / Excel)
- Admin audit logs
- Deployment (Render / AWS / Railway)
Built with ❤️ using FastAPI This project demonstrates real-world backend & full-stack concepts, suitable for interviews and production learning.
This project is open-source and free to use for learning purposes.
---
If you want, next I can:
- Add **screenshots section** to README
- Add **API documentation**
- Prepare **deployment README**
- Make it **GitHub-ready**
Just tell me 🚀