104 lines
2.2 KiB
Markdown
104 lines
2.2 KiB
Markdown
# Service App
|
|
|
|
Modern web application for service management. Built with React, FastAPI, and SQLite.
|
|
|
|
## Features
|
|
|
|
- 👥 User Management
|
|
- 🔐 Authentication & Authorization
|
|
- 🎨 Modern, responsive UI with dark mode
|
|
- 🐳 Fully containerized with Docker
|
|
|
|
## Technology Stack
|
|
|
|
### Frontend
|
|
- React 18 + TypeScript
|
|
- Vite (build tool)
|
|
- Tailwind CSS + shadcn/ui
|
|
- React Query (TanStack Query)
|
|
- Zustand (state management)
|
|
|
|
### Backend
|
|
- FastAPI (Python 3.11+)
|
|
- SQLAlchemy 2.0 (ORM)
|
|
- SQLite (Database)
|
|
- Alembic (migrations)
|
|
- JWT authentication
|
|
|
|
### Infrastructure
|
|
- Docker + Docker Compose
|
|
|
|
## Quick Start
|
|
|
|
### Prerequisites
|
|
|
|
- Docker and Docker Compose
|
|
- Git
|
|
|
|
### Installation
|
|
|
|
1. Clone the repository:
|
|
```bash
|
|
git clone <repository-url>
|
|
cd <repository-folder>
|
|
```
|
|
|
|
2. Copy environment variables:
|
|
```bash
|
|
cp .env.example .env
|
|
# Edit .env with your configuration
|
|
```
|
|
|
|
3. Generate secret key:
|
|
```bash
|
|
openssl rand -base64 32
|
|
# Add to .env as SECRET_KEY
|
|
```
|
|
|
|
4. Start all services:
|
|
```bash
|
|
docker-compose up -d
|
|
```
|
|
|
|
5. Access the application:
|
|
- Frontend: http://localhost:5174
|
|
- Backend API: http://localhost:5174/api/v1
|
|
- API Documentation: http://localhost:5174/docs
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
.
|
|
├── docker-compose.yml
|
|
├── backend/ # FastAPI application
|
|
│ ├── app/
|
|
│ │ ├── api/ # API routes
|
|
│ │ ├── models/ # SQLAlchemy models
|
|
│ │ ├── schemas/ # Pydantic schemas
|
|
│ │ ├── services/ # Business logic
|
|
│ │ └── main.py # Entry point
|
|
│ └── alembic/ # Database migrations
|
|
├── frontend/ # React application
|
|
│ └── src/
|
|
│ ├── components/ # React components
|
|
│ ├── pages/ # Page components
|
|
│ ├── api/ # API client
|
|
│ └── hooks/ # Custom hooks
|
|
└── scripts/ # Utility scripts
|
|
```
|
|
|
|
## Configuration
|
|
|
|
### Environment Variables
|
|
|
|
See `.env.example` for all available configuration options.
|
|
|
|
Key variables:
|
|
- `SECRET_KEY`: JWT secret key
|
|
- `ALLOWED_HOSTS`: CORS configuration
|
|
|
|
## Contributing
|
|
|
|
Feel free to fork and customize for your needs.
|
|
|