Skip to content

Schedule Planner - Full-stack mini CRM for managing university internal system. Builtwith FastAPI backend and modern frontend. Docker-ready with auto-migrations.

License

Notifications You must be signed in to change notification settings

Nikitossik/schedule-planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Schedule Planner

A full-stack web application for schedule planning with modern REST API and intuitive user interface.

πŸš€ Technologies

Backend

  • FastAPI - Modern Python web framework
  • SQLAlchemy - ORM for database operations
  • Alembic - Database migration system
  • Pydantic - Data validation and serialization
  • SQLite/PostgreSQL - Database
  • Uvicorn - ASGI server

Frontend

  • React - User interface library
  • Vite - Build tool and development server
  • Shadcn UI - Styling
  • React Big Calendar - Calendar

DevOps

  • Docker & Docker Compose - Containerization
  • Git - Version control system

πŸ“ Project Structure

schedule-planner/
β”œβ”€β”€ πŸ“‚ backend/                    # Server-side (FastAPI)
β”‚   β”œβ”€β”€ πŸ“‚ app/                    # Main application code
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ models/             # Database models (SQLAlchemy)
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   β”œβ”€β”€ user.py            # User model
β”‚   β”‚   β”‚   β”œβ”€β”€ schedule.py        # Schedule model
β”‚   β”‚   β”‚   β”œβ”€β”€ lesson.py          # Lesson/class model
β”‚   β”‚   β”‚   β”œβ”€β”€ room.py            # Room model
β”‚   β”‚   β”‚   β”œβ”€β”€ subject.py         # Subject model
β”‚   β”‚   β”‚   β”œβ”€β”€ group.py           # Group model
β”‚   β”‚   β”‚   β”œβ”€β”€ faculty.py         # Faculty model
β”‚   β”‚   β”‚   └── ...                # Other models
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ schemas/            # Pydantic schemas for API
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   β”œβ”€β”€ user.py
β”‚   β”‚   β”‚   β”œβ”€β”€ schedule.py
β”‚   β”‚   β”‚   β”œβ”€β”€ lesson.py
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ routes/             # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.py            # Authentication
β”‚   β”‚   β”‚   β”œβ”€β”€ schedule.py        # Schedule API
β”‚   β”‚   β”‚   β”œβ”€β”€ user.py            # User API
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ repositories/       # Data access layer
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ services/           # Business logic
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ utils/              # Utilities
β”‚   β”‚   β”œβ”€β”€ config.py              # Application configuration
β”‚   β”‚   β”œβ”€β”€ database.py            # Database setup
β”‚   β”‚   └── dependencies.py        # FastAPI dependencies
β”‚   β”œβ”€β”€ πŸ“‚ migrations/            # Alembic migrations
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ versions/           # Migration files
β”‚   β”‚   β”œβ”€β”€ env.py                 # Alembic configuration
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ main.py                   # Application entry point
β”‚   β”œβ”€β”€ requirements.txt          # Python dependencies
β”‚   β”œβ”€β”€ alembic.ini               # Alembic configuration
β”‚   β”œβ”€β”€ Dockerfile                # Backend Docker image
β”‚   β”œβ”€β”€ entrypoint.sh             # Startup script with migrations
β”‚   └── .env.example              # Environment variables example
β”œβ”€β”€ πŸ“‚ frontend/                   # Client-side
β”‚   β”œβ”€β”€ πŸ“‚ src/                    # Source code
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/         # React components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/              # Application pages
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ hooks/              # Custom hooks
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ contexts/           # React contexts
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ lib/                # Utilities and libraries
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ assets/             # Static resources
β”‚   β”‚   β”œβ”€β”€ App.jsx                # Main component
β”‚   β”‚   β”œβ”€β”€ main.jsx               # Entry point
β”‚   β”‚   └── index.css              # Global styles
β”‚   β”œβ”€β”€ πŸ“‚ public/                 # Public files
β”‚   β”œβ”€β”€ package.json               # Node.js dependencies
β”‚   β”œβ”€β”€ vite.config.js            # Vite configuration
β”‚   β”œβ”€β”€ Dockerfile                # Frontend Docker image
β”‚   └── .env.example              # Environment variables example
β”œβ”€β”€ docker-compose.yml            # Container orchestration
β”œβ”€β”€ .gitignore                    # Git ignored files
β”œβ”€β”€ LICENSE                       # Project license
└── README.md                     # Project documentation

⚑ Features

πŸ” Authentication & Authorization

  • User registration and login
  • JWT tokens for secure authentication
  • Role-based access control

πŸŽ“ Academic Structure

  • Manage faculties, directions and study forms
  • Create and edit student groups
  • Manage subjects and assignments
  • Manage personal users information
  • Track teacher contracts and workloads

🏒 Resources

  • Create and manage academic years and semesters
  • Manage classrooms and their characteristics

πŸ“Š Schedule Management

  • Create and edit schedules
  • Manage lessons and classes
  • Assign rooms and teachers

πŸ“ˆ Reports & Analytics

  • Export schedules in Excel and PDF formats
  • Detect and resolve various types of scheduling conflicts
  • Monitor and prevent workload hour limit violations

πŸ› οΈ Prerequisites

For Docker deployment (recommended)

For local development

πŸš€ Quick Start

1️⃣ Clone Repository

git clone https://github.com/Nikitossik/schedule-planner.git
cd schedule-planner

2️⃣ Docker Deployment (Recommended)

Setup Environment Files

# Backend environment
copy backend\.env.example backend\.env
# Edit backend/.env with your settings

Run Application

# Build and start all services
docker-compose up --build

# Or run in background
docker-compose up -d --build

# View logs
docker-compose logs -f

The application will be available at:

3️⃣ Local Development

Backend Setup

cd backend

# Create virtual environment
python -m venv .venv

# Activate virtual environment (Windows)
.\.venv\Scripts\Activate.ps1

# Install dependencies
pip install -r requirements.txt

# Setup environment
copy .env.example .env
# Edit .env file with your database settings

# Run database migrations
alembic upgrade head

# Start development server
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Frontend Setup

cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

πŸ”§ Environment Variables

Backend (.env)

# Security & Authentication
ACCESS_SECRET_KEY=your-access-secret-key-here
REFRESH_SECRET_KEY=your-refresh-secret-key-here
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=15
REFRESH_TOKEN_EXPIRE_DAYS=7

# Database
SQLALCHEMY_DATABASE_URL=sqlite:///data.db

# Initial Admin User
INITIAL_ADMIN_EMAIL=admin@example.com
INITIAL_ADMIN_PASSWORD=your-secure-password

# Database reset and populate with initial data (if you need) 
RESET_DB_ON_START=true

πŸ—„οΈ Database Migrations

The application uses Alembic for database migrations:

  • Automatic migrations: Run automatically in Docker
  • Manual migrations: Use alembic upgrade head for local development
  • Create migration: alembic revision --autogenerate -m "description"
  • Migration files: Stored in backend/alembic/versions/

πŸ“š API Documentation

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

If you encounter any issues or have questions:

  1. Check the API documentation
  2. Review the logs: docker-compose logs -f
  3. Open an issue on GitHub
  4. Check existing issues for solutions

🎯 Roadmap

  • Mobile application
  • Email notifications
  • Advanced reporting
  • Multi-language support

Happy Scheduling! πŸ“…βœ¨

About

Schedule Planner - Full-stack mini CRM for managing university internal system. Builtwith FastAPI backend and modern frontend. Docker-ready with auto-migrations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published