Skip to content

ryanbasic1/internship_project

Repository files navigation

Employee Management System (Django Internship Project)

Overview

A Django-based Employee Management System with REST APIs, PostgreSQL, and Swagger documentation. Includes models for Employee, Department, Attendance, and Performance, plus seeded fake data for testing.

Features

  • Modular Django apps: employees, department, attendance, performance
  • PostgreSQL database configuration via .env
  • CRUD REST APIs for all models
  • API documentation at /swagger/ (Swagger UI)
  • Database seeding with Faker

Setup Instructions

  1. Clone the repository
  2. Install dependencies
    pip install -r requirements.txt
  3. Configure environment variables
    • Copy .env.example to .env and fill in your secrets
  4. Run migrations
    python manage.py migrate
  5. Seed the database
    python manage.py seed_data
  6. Start the server
    python manage.py runserver

API Endpoints

  • /api/employees/ : Employee CRUD
  • /api/departments/ : Department CRUD
  • /api/attendance/ : Attendance CRUD
  • /api/performance/ : Performance CRUD

API Documentation

  • Visit /swagger/ for interactive API docs (Swagger UI)

Environment Variables

See .env.example for required variables:

POSTGRES_DB=employeedb
POSTGRES_USER=postgres
POSTGRES_PASSWORD=yourpassword
POSTGRES_HOST=localhost
POSTGRES_PORT=5432

Seeding Data

Run python manage.py seed_data to generate 50 employees, departments, attendance, and performance records.

Project Structure

employee_project/
├── employees/
│   ├── models.py
│   ├── serializers.py
│   ├── views.py
│   └── management/commands/seed_data.py
├── department/
│   ├── models.py
│   ├── serializers.py
│   ├── views.py
├── attendance/
│   ├── models.py
│   ├── serializers.py
│   ├── views.py
├── performance/
│   ├── models.py
│   ├── serializers.py
│   ├── views.py
├── employee_project/
│   ├── settings.py
│   ├── urls.py
│   ├── swagger_urls.py
├── requirements.txt
├── .env.example
├── .env
├── README.md

Credits

  • Django, Django REST Framework, drf-yasg, django-environ, Faker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages