feat: Space Booking System - MVP complet
Sistem web pentru rezervarea de birouri și săli de ședință cu flux de aprobare administrativă. Stack: FastAPI + Vue.js 3 + SQLite + TypeScript Features implementate: - Autentificare JWT + Self-registration cu email verification - CRUD Spații, Utilizatori, Settings (Admin) - Calendar interactiv (FullCalendar) cu drag-and-drop - Creare rezervări cu validare (durată, program, overlap, max/zi) - Rezervări recurente (săptămânal) - Admin: aprobare/respingere/anulare cereri - Admin: creare directă rezervări (bypass approval) - Admin: editare orice rezervare - User: editare/anulare rezervări proprii - Notificări in-app (bell icon + dropdown) - Notificări email (async SMTP cu BackgroundTasks) - Jurnal acțiuni administrative (audit log) - Rapoarte avansate (utilizare, top users, approval rate) - Șabloane rezervări (booking templates) - Atașamente fișiere (upload/download) - Conflict warnings (verificare disponibilitate real-time) - Integrare Google Calendar (OAuth2) - Suport timezone (UTC storage + user preference) - 225+ teste backend Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
178
README.md
Normal file
178
README.md
Normal file
@@ -0,0 +1,178 @@
|
||||
# Space Booking System
|
||||
|
||||
Web application for booking offices and meeting rooms with administrative approval flow.
|
||||
|
||||
## Tech Stack
|
||||
|
||||
**Backend:**
|
||||
- FastAPI 0.115+ (Python 3.12+)
|
||||
- SQLAlchemy 2.0 (ORM)
|
||||
- SQLite database
|
||||
- JWT authentication
|
||||
- Uvicorn (ASGI server)
|
||||
|
||||
**Frontend:**
|
||||
- Vue.js 3.4+
|
||||
- Vite 5.x (build tool)
|
||||
- Pinia (state management)
|
||||
- Vue Router 4.x
|
||||
- TypeScript
|
||||
- FullCalendar (calendar view)
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Python 3.12+
|
||||
- Node.js 18+
|
||||
- npm or yarn
|
||||
|
||||
### Backend Setup
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
|
||||
# Create virtual environment
|
||||
python -m venv venv
|
||||
source venv/bin/activate # On Windows: venv\Scripts\activate
|
||||
|
||||
# Install dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Seed database with demo users
|
||||
python seed_db.py
|
||||
|
||||
# Run development server
|
||||
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
Backend will be available at: http://localhost:8000
|
||||
|
||||
API documentation: http://localhost:8000/docs
|
||||
|
||||
### Frontend Setup
|
||||
|
||||
```bash
|
||||
cd frontend
|
||||
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Run development server
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Frontend will be available at: http://localhost:5173
|
||||
|
||||
## Demo Accounts
|
||||
|
||||
After seeding the database:
|
||||
|
||||
- **Admin:** admin@example.com / adminpassword
|
||||
- **User:** user@example.com / userpassword
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Backend
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
|
||||
# Type checking
|
||||
mypy app/
|
||||
|
||||
# Linting
|
||||
ruff check .
|
||||
|
||||
# Format code
|
||||
ruff format .
|
||||
|
||||
# Run tests
|
||||
pytest
|
||||
|
||||
# Run with auto-reload
|
||||
uvicorn app.main:app --reload
|
||||
```
|
||||
|
||||
### Frontend
|
||||
|
||||
```bash
|
||||
cd frontend
|
||||
|
||||
# Type checking
|
||||
npm run typecheck
|
||||
|
||||
# Linting
|
||||
npm run lint
|
||||
|
||||
# Build for production
|
||||
npm run build
|
||||
|
||||
# Preview production build
|
||||
npm run preview
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
space-booking/
|
||||
├── backend/
|
||||
│ ├── app/
|
||||
│ │ ├── api/ # API endpoints
|
||||
│ │ ├── core/ # Core utilities (config, security)
|
||||
│ │ ├── db/ # Database session
|
||||
│ │ ├── models/ # SQLAlchemy models
|
||||
│ │ ├── schemas/ # Pydantic schemas
|
||||
│ │ └── main.py # FastAPI application
|
||||
│ ├── tests/ # Backend tests
|
||||
│ ├── requirements.txt
|
||||
│ └── seed_db.py # Database seeding script
|
||||
├── frontend/
|
||||
│ ├── src/
|
||||
│ │ ├── assets/ # CSS and static assets
|
||||
│ │ ├── components/ # Vue components
|
||||
│ │ ├── router/ # Vue Router configuration
|
||||
│ │ ├── services/ # API services
|
||||
│ │ ├── stores/ # Pinia stores
|
||||
│ │ ├── types/ # TypeScript types
|
||||
│ │ ├── views/ # Page components
|
||||
│ │ ├── App.vue # Root component
|
||||
│ │ └── main.ts # Application entry
|
||||
│ └── package.json
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
### Implemented (US-001)
|
||||
|
||||
- [x] User authentication with JWT
|
||||
- [x] Login page with email/password
|
||||
- [x] Protected routes
|
||||
- [x] Token storage and validation
|
||||
- [x] Redirect to dashboard on successful login
|
||||
- [x] Role-based access (admin/user)
|
||||
|
||||
### Coming Soon
|
||||
|
||||
- Space management (CRUD)
|
||||
- Booking calendar view
|
||||
- Booking request system
|
||||
- Admin approval workflow
|
||||
- Notifications
|
||||
- Audit log
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Authentication
|
||||
|
||||
- `POST /api/auth/login` - Login with email and password
|
||||
|
||||
### Health
|
||||
|
||||
- `GET /` - API info
|
||||
- `GET /health` - Health check
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Reference in New Issue
Block a user