402f8e07a875faedbd693c0674e34f047df30f4c
Edu-Space Admin Panel
A comprehensive web-based administration interface for the Edu-Space Classroom Reservation System built with Flask.
Features
🔐 Authentication & Security
- Secure login system with hashed passwords
- Role-based access control
- Session management with Flask-Login
- Password change functionality
🏫 Classroom Management
- Create, edit, and delete classrooms
- Campus and building organization
- Capacity and resource tracking
- Real-time availability checking
📅 Schedule Management
- Interactive calendar view (FullCalendar)
- Reservation creation and management
- Conflict detection and prevention
- Status tracking (Pending, Confirmed, Cancelled)
- Today's schedule overview
📊 Dashboard & Analytics
- Real-time statistics
- Monthly reservation charts
- Quick actions interface
- Upcoming reservations overview
🎨 Modern UI/UX
- Responsive Bootstrap 5 design
- Dark theme support
- Mobile-friendly interface
- Interactive components and charts
Tech Stack
- Backend: Flask (Python)
- Database: SQLAlchemy (SQLite/PostgreSQL)
- Frontend: Bootstrap 5, jQuery, Chart.js
- Authentication: Flask-Login, Werkzeug
- Forms: Flask-WTF
- Calendar: FullCalendar.js
Installation
Prerequisites
- Python 3.8+
- pip package manager
Setup
- Clone or setup the project:
cd /Users/alejandro.v/PycharmProjects/admin-edu-space
- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Setup environment variables:
cp .env.example .env
# Edit .env with your configuration
- Initialize database:
python app.py
Configuration
Environment Variables (.env)
FLASK_APP=app.py
FLASK_ENV=development
SECRET_KEY=your-secret-key-here-please-change-in-production
DATABASE_URL=sqlite:///edu_space.db
API_BASE_URL=http://localhost:8080/api
Usage
Start the Application
python app.py
The application will be available at: http://localhost:5000
Default Login
- Email: admin@edu-space.com
- Password: admin123
Main Features
- Dashboard: Overview of system statistics and upcoming reservations
- Classrooms: Manage classroom information, capacity, and resources
- Schedule: View and manage reservations with calendar interface
- Profile: User profile and password management
API Integration
The admin panel integrates with the Spring Boot API at http://localhost:8080/api. Make sure the Java microservice is running for full functionality.
Project Structure
admin-edu-space/
├── app/
│ ├── __init__.py # Flask app factory
│ ├── models/ # Database models
│ │ ├── user.py
│ │ ├── classroom.py
│ │ ├── subject.py
│ │ └── reservation.py
│ ├── routes/ # Application routes
│ │ ├── auth.py
│ │ ├── main.py
│ │ ├── classrooms.py
│ │ └── schedule.py
│ ├── forms/ # WTForms classes
│ │ ├── auth.py
│ │ ├── classroom.py
│ │ └── reservation.py
│ ├── templates/ # Jinja2 templates
│ ├── static/ # Static files
├── config/ # Configuration files
├── requirements.txt
├── .env
├── app.py
└── README.md
Database Schema
Users Table
- User authentication and authorization
- Role management (admin, staff)
Classrooms Table
- Classroom information
- Capacity and location details
- Resource management
Reservations Table
- Booking management
- Time slot scheduling
- Status tracking
Subjects + Commissions Tables
- Academic information
- Teacher assignments
- Student enrollment tracking
Security Features
- Password hashing with bcrypt
- Session management
- CSRF protection
- Input validation and sanitization
- SQL injection prevention with SQLAlchemy ORM
Development
Running in Development Mode
export FLASK_ENV=development
python app.py
Adding New Features
- Create models in
app/models/ - Add routes in
app/routes/ - Create forms if needed in
app/forms/ - Update templates in
app/templates/
Production Deployment
Environment Setup
- Set production variables:
FLASK_ENV=production
SECRET_KEY=<strong-random-string>
DATABASE_URL=<production-database-url>
- Use production WSGI server:
pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 app:app
- Configure reverse proxy (nginx/Apache)
Troubleshooting
Common Issues
-
Database connection errors:
- Check DATABASE_URL string
- Ensure directory permissions
-
Login issues:
- Verify admin user exists
- Check password hash
-
Static files not loading:
- Ensure blueprint route registration
- Check file permissions
Contributing
- Fork the repository
- Create feature branch
- Make changes
- Test thoroughly
- Submit pull request
License
This project is part of the Edu-Space educational management system.
Support
For support and questions:
- Email: admin@edu-space.com
- Documentation: Check inline comments and README files
Note: This admin panel is designed to work alongside the Spring Boot microservice. Ensure both services are running for complete functionality.
Languages
HTML
52.6%
Python
35.7%
JavaScript
10.1%
CSS
1.6%