feat: Add full CRUD functionality, project detail panel, and improved UI
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
- Add UPDATE and DELETE endpoints to backend - Implement project detail panel with comprehensive editing - Add drag-and-drop functionality for projects in mind map - Show all projects in map (not just selected + children) - Fix infinite render loop in MindMap component - Improve UI spacing and button layouts - Add local development database schema with RLS disabled - Update docker-compose for regular docker-compose (not Swarm) - Add CORS support and nginx API proxying - Improve button spacing and modern design principles
This commit is contained in:
111
deploy/local/TEST.md
Normal file
111
deploy/local/TEST.md
Normal file
@@ -0,0 +1,111 @@
|
||||
# Testing Instructions
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. **Start Docker Desktop** - Make sure Docker Desktop is running on your Windows machine
|
||||
2. **Verify Docker is running**:
|
||||
```powershell
|
||||
docker ps
|
||||
```
|
||||
This should not show an error.
|
||||
|
||||
## Step 1: Start the Services
|
||||
|
||||
From the project root directory:
|
||||
|
||||
```powershell
|
||||
docker compose -f deploy/local/docker-compose.yml up --build
|
||||
```
|
||||
|
||||
Or to run in detached mode (background):
|
||||
|
||||
```powershell
|
||||
docker compose -f deploy/local/docker-compose.yml up --build -d
|
||||
```
|
||||
|
||||
## Step 2: Verify Services are Running
|
||||
|
||||
Check that all containers are running:
|
||||
|
||||
```powershell
|
||||
docker compose -f deploy/local/docker-compose.yml ps
|
||||
```
|
||||
|
||||
You should see three services:
|
||||
- `evrak-postgres` (healthy)
|
||||
- `evrak-backend` (running)
|
||||
- `evrak-frontend` (running)
|
||||
|
||||
## Step 3: Check Logs
|
||||
|
||||
View logs to ensure everything started correctly:
|
||||
|
||||
```powershell
|
||||
# All services
|
||||
docker compose -f deploy/local/docker-compose.yml logs
|
||||
|
||||
# Specific service
|
||||
docker compose -f deploy/local/docker-compose.yml logs backend
|
||||
docker compose -f deploy/local/docker-compose.yml logs postgres
|
||||
```
|
||||
|
||||
## Step 4: Test the API
|
||||
|
||||
### Test Backend Health
|
||||
```powershell
|
||||
curl http://localhost:3000
|
||||
```
|
||||
|
||||
### Create a Tenant
|
||||
```powershell
|
||||
curl -X POST http://localhost:3000/tenants -H "Content-Type: application/json" -d "{\"name\":\"Test Tenant\"}"
|
||||
```
|
||||
|
||||
### Create a Project
|
||||
```powershell
|
||||
curl -X POST http://localhost:3000/projects -H "Content-Type: application/json" -d "{\"name\":\"Test Project\",\"tenant_id\":\"00000000-0000-0000-0000-000000000001\",\"path\":\"test_project\"}"
|
||||
```
|
||||
|
||||
### Get All Projects
|
||||
```powershell
|
||||
curl http://localhost:3000/projects
|
||||
```
|
||||
|
||||
## Step 5: Access the Frontend
|
||||
|
||||
Open your browser and navigate to:
|
||||
- **Frontend**: http://localhost
|
||||
- **Backend API**: http://localhost:3000
|
||||
|
||||
## Step 6: Stop Services
|
||||
|
||||
When done testing:
|
||||
|
||||
```powershell
|
||||
docker compose -f deploy/local/docker-compose.yml down
|
||||
```
|
||||
|
||||
To also remove volumes (database data):
|
||||
|
||||
```powershell
|
||||
docker compose -f deploy/local/docker-compose.yml down -v
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Docker Desktop Not Running
|
||||
- Start Docker Desktop from Windows Start Menu
|
||||
- Wait for it to fully start (whale icon in system tray should be steady)
|
||||
|
||||
### Port Already in Use
|
||||
- Check if ports 80, 3000, or 5432 are already in use
|
||||
- Stop conflicting services or change ports in docker-compose.yml
|
||||
|
||||
### Database Connection Issues
|
||||
- Wait a few seconds after starting for database to initialize
|
||||
- Check postgres logs: `docker compose -f deploy/local/docker-compose.yml logs postgres`
|
||||
|
||||
### Build Errors
|
||||
- Make sure you're in the project root directory
|
||||
- Try: `docker compose -f deploy/local/docker-compose.yml build --no-cache`
|
||||
|
||||
Reference in New Issue
Block a user