docs: Update README.md to include Docker development instructions and additional API endpoints
This commit is contained in:
58
README.md
58
README.md
@@ -39,6 +39,7 @@ A comprehensive project management system built with Next.js for managing constr
|
|||||||
- **Styling**: Tailwind CSS
|
- **Styling**: Tailwind CSS
|
||||||
- **Date Handling**: date-fns
|
- **Date Handling**: date-fns
|
||||||
- **Frontend**: React 19
|
- **Frontend**: React 19
|
||||||
|
- **Container**: Docker & Docker Compose
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
@@ -46,9 +47,12 @@ A comprehensive project management system built with Next.js for managing constr
|
|||||||
|
|
||||||
- Node.js (version 16 or higher)
|
- Node.js (version 16 or higher)
|
||||||
- npm or yarn
|
- npm or yarn
|
||||||
|
- Docker (optional, for containerized development)
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
|
#### Option 1: Local Development
|
||||||
|
|
||||||
1. Clone the repository
|
1. Clone the repository
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -70,6 +74,23 @@ npm run dev
|
|||||||
|
|
||||||
4. Open [http://localhost:3000](http://localhost:3000) in your browser
|
4. Open [http://localhost:3000](http://localhost:3000) in your browser
|
||||||
|
|
||||||
|
#### Option 2: Docker Development
|
||||||
|
|
||||||
|
1. Clone the repository
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone <repository-url>
|
||||||
|
cd panel
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Start with Docker Compose
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Open [http://localhost:3000](http://localhost:3000) in your browser
|
||||||
|
|
||||||
### Database Setup
|
### Database Setup
|
||||||
|
|
||||||
The application uses SQLite database which will be automatically initialized on first run. The database file is located at `data/database.sqlite`.
|
The application uses SQLite database which will be automatically initialized on first run. The database file is located at `data/database.sqlite`.
|
||||||
@@ -80,7 +101,9 @@ The application uses SQLite database which will be automatically initialized on
|
|||||||
src/
|
src/
|
||||||
├── app/ # Next.js app router pages
|
├── app/ # Next.js app router pages
|
||||||
│ ├── api/ # API routes
|
│ ├── api/ # API routes
|
||||||
|
│ │ ├── all-project-tasks/ # Get all project tasks endpoint
|
||||||
│ │ ├── contracts/ # Contract management endpoints
|
│ │ ├── contracts/ # Contract management endpoints
|
||||||
|
│ │ ├── notes/ # Notes management endpoints
|
||||||
│ │ ├── projects/ # Project management endpoints
|
│ │ ├── projects/ # Project management endpoints
|
||||||
│ │ ├── project-tasks/ # Task management endpoints
|
│ │ ├── project-tasks/ # Task management endpoints
|
||||||
│ │ └── tasks/ # Task template endpoints
|
│ │ └── tasks/ # Task template endpoints
|
||||||
@@ -89,10 +112,17 @@ src/
|
|||||||
│ └── tasks/ # Task management pages
|
│ └── tasks/ # Task management pages
|
||||||
├── components/ # Reusable React components
|
├── components/ # Reusable React components
|
||||||
│ ├── ui/ # UI components (Button, Card, etc.)
|
│ ├── ui/ # UI components (Button, Card, etc.)
|
||||||
│ └── forms/ # Form components
|
│ ├── ContractForm.js # Contract form component
|
||||||
|
│ ├── NoteForm.js # Note form component
|
||||||
|
│ ├── ProjectForm.js # Project form component
|
||||||
|
│ ├── ProjectTaskForm.js # Project task form component
|
||||||
|
│ ├── ProjectTasksSection.js # Project tasks section component
|
||||||
|
│ ├── TaskForm.js # Task form component
|
||||||
|
│ └── TaskTemplateForm.js # Task template form component
|
||||||
└── lib/ # Utility functions
|
└── lib/ # Utility functions
|
||||||
├── queries/ # Database query functions
|
├── queries/ # Database query functions
|
||||||
└── db.js # Database connection
|
├── db.js # Database connection
|
||||||
|
└── init-db.js # Database initialization
|
||||||
```
|
```
|
||||||
|
|
||||||
## Available Scripts
|
## Available Scripts
|
||||||
@@ -102,6 +132,12 @@ src/
|
|||||||
- `npm run start` - Start production server
|
- `npm run start` - Start production server
|
||||||
- `npm run lint` - Run ESLint
|
- `npm run lint` - Run ESLint
|
||||||
|
|
||||||
|
## Docker Commands
|
||||||
|
|
||||||
|
- `docker-compose up` - Start the application with Docker
|
||||||
|
- `docker-compose down` - Stop the Docker containers
|
||||||
|
- `docker-compose up --build` - Rebuild and start the application
|
||||||
|
|
||||||
## Database Schema
|
## Database Schema
|
||||||
|
|
||||||
The application uses the following main tables:
|
The application uses the following main tables:
|
||||||
@@ -126,13 +162,31 @@ The application uses the following main tables:
|
|||||||
|
|
||||||
- `GET /api/contracts` - Get all contracts
|
- `GET /api/contracts` - Get all contracts
|
||||||
- `POST /api/contracts` - Create new contract
|
- `POST /api/contracts` - Create new contract
|
||||||
|
- `GET /api/contracts/[id]` - Get contract by ID
|
||||||
|
- `PUT /api/contracts/[id]` - Update contract
|
||||||
|
- `DELETE /api/contracts/[id]` - Delete contract
|
||||||
|
|
||||||
### Tasks
|
### Tasks
|
||||||
|
|
||||||
|
- `GET /api/tasks` - Get task templates
|
||||||
|
- `POST /api/tasks` - Create new task template
|
||||||
|
- `GET /api/tasks/[id]` - Get task template by ID
|
||||||
|
- `PUT /api/tasks/[id]` - Update task template
|
||||||
|
- `DELETE /api/tasks/[id]` - Delete task template
|
||||||
|
- `GET /api/tasks/templates` - Get all task templates
|
||||||
|
|
||||||
|
### Project Tasks
|
||||||
|
|
||||||
- `GET /api/project-tasks` - Get project tasks or task templates
|
- `GET /api/project-tasks` - Get project tasks or task templates
|
||||||
- `POST /api/project-tasks` - Create new project task
|
- `POST /api/project-tasks` - Create new project task
|
||||||
- `PATCH /api/project-tasks/[id]` - Update task status
|
- `PATCH /api/project-tasks/[id]` - Update task status
|
||||||
- `DELETE /api/project-tasks/[id]` - Delete task
|
- `DELETE /api/project-tasks/[id]` - Delete task
|
||||||
|
- `GET /api/all-project-tasks` - Get all project tasks across all projects
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
- `POST /api/notes` - Create new note
|
||||||
|
- `DELETE /api/notes` - Delete note
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user