Skip to content

18deepthi/Payroll_management_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Payroll Management Backend (FastAPI)

This is a complete Payroll Management API developed as part of Anshumat Internship Backend Assignment. It demonstrates authentication, authorization, salary slip CRUD operations, and role-based access using FastAPI.

🧰 Tech Stack

Component Technology
Backend FastAPI
ORM SQLAlchemy
Database SQLite
Auth JWT + OAuth2PasswordRequestForm
Password Hashing bcrypt

✨ Features πŸ” Authentication

  • Login (OAuth2)
  • JWT access tokens
  • Password hashing

πŸ‘₯ Authorization

Role Access
Admin Create + Update + View all salary slips
Employee View only own salary slips

πŸ’Έ Salary Slips

  • Create salary slip
  • Update salary slip
  • Get salary slips by role

πŸ’° Expenses

  • Employee expense submission
  • Admin expense approval

πŸ“¦ Project Structure

backend/ main.py auth.py models.py schemas.py database.py requirements.txt

▢️ How to run locally

cd backend python -m venv .venv .venv\Scripts\Activate pip install -r requirements.txt uvicorn main:app --reload --port 8000

Open Swagger UI:

http://127.0.0.1:8000/docs πŸ”‘ Admin Login

email: hire-me@anshumat.org password: HireMe@2025!

Use this to generate token for testing protected endpoints.

πŸ§ͺ Sample Endpoints

Method Endpoint Description
POST /auth/login Login & get JWT token
GET /auth/me Current user
POST /salary-slip Create slip
PUT /salary-slip/{id} Update slip
GET /salary-slip List slips
POST /expense Create expense
GET /expense View expenses

🧾 Screenshots Screenshot 2025-12-06 132154 Screenshot 2025-12-06 132056 Screenshot 2025-12-06 132037 Screenshot 2025-12-06 132248 Screenshot 2025-12-06 132208

  • Login success
  • Salary slip POST 200
  • Salary slip GET 200
  • Swagger endpoints working

πŸ“’ Notes

This assignment demonstrates backend development skills including:

  • Authentication
  • Role based access
  • Database CRUD
  • Secure API patterns

πŸ™‹β€β™‚οΈ Author

Venkata Sai Deepthi

Email: venkatasaideepthi3@gmail.com

About

This is a backend assignment built for Anshumat Foundation internship submission using Python, FastAPI, and SQLite.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors