📊 AttendanceApp – Smart Attendance Management System
📑 Table of Contents
Overview
Features
Tech Stack
Architecture
Project Structure
Installation
Running the Application
API Endpoints
Database Schema
Example API Response
Environment Variables
Deployment
Future Improvements
Contributing
Author
License
📌 Overview
AttendanceApp is a lightweight backend system built using Python and FastAPI to manage student attendance efficiently.
The application allows users to store, track, and manage attendance records using a simple API structure and a SQLite database.
This project demonstrates backend development concepts such as:
REST API development
Database integration
Server deployment
Python backend architecture
🚀 Features
✅ Student attendance tracking ✅ FastAPI backend API ✅ SQLite database integration ✅ Lightweight and easy to run ✅ RESTful API endpoints
🛠 Tech Stack
Backend: Python
Framework: FastAPI
Server: Uvicorn
Database: SQLite
Version Control: Git & GitHub
🏗 Architecture Client Request ↓ FastAPI Routes (main.py) ↓ Database Layer (database.py) ↓ SQLite Database (attendance.db) ↓ API Response
📂 Project Structure AttendanceApp │ ├── AttendanceApp/ # Application modules ├── main.py # Main FastAPI application ├── database.py # Database connection and logic ├── attendance.db # SQLite database file ├── requirements.txt # Project dependencies ├── .gitignore # Ignored files └── README.md # Project documentation
⚙️ Installation 1️⃣ Clone the Repository git clone https://github.com/amartya69/AttendanceApp.git
2️⃣ Navigate to Project Folder cd AttendanceApp
3️⃣ Create Virtual Environment python -m venv venv
Activate environment
Windows
venv\Scripts\activate
Mac / Linux
source venv/bin/activate
4️⃣ Install Dependencies pip install -r requirements.txt
Start the FastAPI server:
uvicorn main:app --reload
Server will run at:
Interactive API documentation:
📡 API Endpoints Method Endpoint Description GET /attendance Get attendance records POST /attendance Add attendance GET /students Get student list
(Modify based on your actual endpoints)
🗄 Database Schema
Example attendance table structure:
Column Type id INTEGER student_name TEXT date TEXT status TEXT
📡 Example API Endpoint
Example request:
GET /attendance
Example response:
{ "student_id": 1, "name": "John Doe", "status": "Present" }
🔐 Environment Variables
If required, create a .env file:
DATABASE_URL=sqlite:///attendance.db
☁️ Deployment
This project can be deployed using:
Render
Railway
Heroku
Docker
Example Render command: uvicorn main:app --host 0.0.0.0 --port 10000
🎯 Project Goals
The main objective of this project is to build a simple backend system that demonstrates how attendance data can be stored and managed using REST APIs.
Goals of the project:
Understand backend development using FastAPI
Learn database integration with SQLite
Build and test RESTful APIs
Practice structuring a Python backend project
Deploy a backend service on cloud platforms
📊 System Workflow
The workflow of the AttendanceApp is:
User Request ↓ FastAPI Endpoint ↓ Business Logic ↓ Database Query ↓ SQLite Database ↓ Response Returned to Client
🔍 API Documentation
FastAPI automatically generates interactive API documentation.
You can access it here after running the server:
Swagger UI
ReDoc Documentation
These interfaces allow developers to test API endpoints directly from the browser.
🧪 Testing the API
You can test the API using the following tools:
Swagger UI (built-in with FastAPI)
Postman
cURL
Example using cURL:
curl http://127.0.0.1:8000/attendance
Example using Postman:
Open Postman
Create a new request
Use endpoint GET /attendance
Send request and view response
📁 Dependency Management
All project dependencies are listed in the requirements.txt file.
Example dependencies:
fastapi uvicorn pydantic sqlite3
Install them using: pip install -r requirements.txt
🛡 Error Handling
The application includes basic error handling for:
Invalid API requests
Database connection errors
Missing parameters
FastAPI automatically returns appropriate HTTP responses such as:
200 OK
400 Bad Request
404 Not Found
500 Internal Server Error
📦 Deployment Ready
This project is ready for deployment on cloud platforms such as:
Render
Railway
Heroku
Docker containers
Deployment command example: uvicorn main:app --host 0.0.0.0 --port 10000
🔧 Development Setup
Recommended development tools:
Tool Purpose VS Code Code Editor Python 3.9+ Runtime Git Version Control Postman API Testing
Recommended VS Code extensions:
Python
Pylance
REST Client
📚 Learning Outcomes
Through this project, the following concepts were practiced:
Backend API development
REST architecture
Database integration
API documentation
Deployment preparation
📊 Repository Stats (Optional but Good)
You can add GitHub stats badges:
💡 Small Improvements You Should Make (Based on Screenshot)
Your repo currently shows:
"No description, website, or topics provided."
Add this in About Section. Description FastAPI-based backend system for managing student attendance with SQLite database. Topics python fastapi backend attendance-system sqlite api rest
This system can be used in:
-
🎓 Colleges for student attendance tracking
-
🏫 Schools for daily attendance management
-
🏢 Small organizations for employee tracking
-
🧪 Learning backend development with real-world examples
-
API Request Flow Example
Example flow for marking attendance:
- Client sends POST request to
/attendance - FastAPI validates request data
- Business logic processes attendance
- Data is stored in SQLite database
- Response is returned with status
This ensures smooth and structured data handling.
🧱 Code Design Principles
This project follows:
-
Separation of concerns (API vs Database)
-
Modular structure
-
Clean and readable code
-
RESTful API design
-
Scalability for future improvements
-
🔐 Security Considerations
Currently implemented:
- Input validation using FastAPI
- Structured API responses
Planned improvements:
-
Authentication (JWT)
-
Role-based access control
-
Secure database connections
-
Performance Notes
-
FastAPI provides high performance using ASGI
-
SQLite ensures lightweight and fast local storage
-
Suitable for small to medium-scale applications
-
Versioning
Current Version: v1.0.0
Future versions will include:
-
Authentication system
-
Frontend integration
-
Advanced analytics
-
Possible Integrations
This system can be extended with:
-
React / Angular frontend
-
Mobile apps (Flutter / Android)
-
Cloud databases (PostgreSQL, MongoDB)
-
Authentication services (Firebase/Auth0)
-
Known Issues
-
No authentication implemented
-
Limited UI (backend-only project)
-
SQLite not ideal for large-scale production
-
Roadmap
- Basic FastAPI setup
- Database integration
- Attendance APIs
- Authentication system
- Admin dashboard
- Cloud deployment
- Frontend integration
Acknowledgements
- FastAPI documentation
- Python community
- Open-source contributors
📈 Future Improvements
Authentication system
Web-based dashboard
Analytics for attendance
Student management system
📜 License
This project is open-source and available under the MIT License.
Cloud database support
👨💻 Author
Amartya Prakash
Backend Developer
Interested in Python, Java, and API Development
Building projects to improve software development skills