68c6165b322d5dc546f37b22560ce1c06aad7e2e
feat: add date_completed column to project_tasks table in database initialization feat: update project task status to set date_completed when marking as completed
Project Management Panel
A comprehensive project management system built with Next.js for managing construction/engineering projects, contracts, and tasks.
Features
📋 Project Management
- Create and manage projects with detailed information
- Link projects to contracts
- Track project deadlines and progress
- Add custom notes and contact information
📄 Contract Management
- Create and manage contracts
- Track contract details including customer and investor information
- Link multiple projects to contracts
- Monitor contract deadlines
✅ Task Management
- Create task templates for reusable workflows
- Add tasks to projects (both template-based and custom)
- Track task status and priorities
- Monitor task deadlines and completion
📊 Dashboard
- Overview of project statistics
- Recent projects display
- Task completion tracking
- Quick access to pending items
Tech Stack
- Framework: Next.js 15.1.8
- Database: SQLite with better-sqlite3
- Styling: Tailwind CSS
- Date Handling: date-fns
- Frontend: React 19
- Container: Docker & Docker Compose
Getting Started
Prerequisites
- Node.js (version 16 or higher)
- npm or yarn
- Docker (optional, for containerized development)
Installation
Option 1: Local Development
- Clone the repository
git clone <repository-url>
cd panel
- Install dependencies
npm install
- Start the development server
npm run dev
- Open http://localhost:3000 in your browser
Option 2: Docker Development
- Clone the repository
git clone <repository-url>
cd panel
- Start with Docker Compose
docker-compose up
- Open http://localhost:3000 in your browser
Database Setup
The application uses SQLite database which will be automatically initialized on first run. The database file is located at data/database.sqlite.
Project Structure
src/
├── app/ # Next.js app router pages
│ ├── api/ # API routes
│ │ ├── all-project-tasks/ # Get all project tasks endpoint
│ │ ├── contracts/ # Contract management endpoints
│ │ ├── notes/ # Notes management endpoints
│ │ ├── projects/ # Project management endpoints
│ │ ├── project-tasks/ # Task management endpoints
│ │ └── tasks/ # Task template endpoints
│ ├── contracts/ # Contract pages
│ ├── projects/ # Project pages
│ └── tasks/ # Task management pages
├── components/ # Reusable React components
│ ├── ui/ # UI components (Button, Card, etc.)
│ ├── 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
├── queries/ # Database query functions
├── db.js # Database connection
└── init-db.js # Database initialization
Available Scripts
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
Docker Commands
docker-compose up- Start the application with Dockerdocker-compose down- Stop the Docker containersdocker-compose up --build- Rebuild and start the application
Database Schema
The application uses the following main tables:
- contracts - Contract information
- projects - Project details linked to contracts
- tasks - Task templates
- project_tasks - Tasks assigned to specific projects
- notes - Project notes and updates
API Endpoints
Projects
GET /api/projects- Get all projectsPOST /api/projects- Create new projectGET /api/projects/[id]- Get project by IDPUT /api/projects/[id]- Update projectDELETE /api/projects/[id]- Delete project
Contracts
GET /api/contracts- Get all contractsPOST /api/contracts- Create new contractGET /api/contracts/[id]- Get contract by IDPUT /api/contracts/[id]- Update contractDELETE /api/contracts/[id]- Delete contract
Tasks
GET /api/tasks- Get task templatesPOST /api/tasks- Create new task templateGET /api/tasks/[id]- Get task template by IDPUT /api/tasks/[id]- Update task templateDELETE /api/tasks/[id]- Delete task templateGET /api/tasks/templates- Get all task templates
Project Tasks
GET /api/project-tasks- Get project tasks or task templatesPOST /api/project-tasks- Create new project taskPATCH /api/project-tasks/[id]- Update task statusDELETE /api/project-tasks/[id]- Delete taskGET /api/all-project-tasks- Get all project tasks across all projects
Notes
POST /api/notes- Create new noteDELETE /api/notes- Delete note
Advanced Map Features
This project includes a powerful map system for project locations, supporting multiple dynamic base layers:
- OpenStreetMap (default street map)
- Polish Geoportal Orthophoto (aerial imagery via WMTS)
- Polish Land Records (WMS cadastral data)
- Satellite (Esri) and Topographic layers
Users can switch layers using the map control (📚 icon). WMTS/WMS layers are configured dynamically using OGC GetCapabilities, making it easy to add new sources. See docs/MAP_LAYERS.md for details on adding and configuring map layers.
UI/UX
- Modern, responsive interface built with React 19 and Tailwind CSS
- Intuitive dashboards, search, and filter components
- Modular, reusable UI components for forms, lists, and maps
Extensibility & Testing
- Modular codebase: easily add new features, endpoints, or UI components
- Automated tests: Playwright for E2E, Jest and Testing Library for unit/integration
- Dockerized for consistent development and deployment
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is private and proprietary.
Description
Languages
JavaScript
95.7%
HTML
4%
CSS
0.2%