Full-stack web application for managing and analyzing environmental case data from GIDAS database system.
Technology Stack:
- Backend: FastAPI with SQLAlchemy ORM
- Frontend: React with TypeScript
- Database: Microsoft SQL Server
- State Management: React Query (TanStack Query)
- UI Components: Custom UI component library
- Build Tools: Vite (frontend), Python pip (backend)
- Separering Dashboard: Specialized UI for separation cases
- Γ ben Land Dashboard: Environmental case management
- Dispensationssag Dashboard: Dispensation case tracking
- Nedsivningstilladelse Dashboard: Permits and authorizations
- Analytics Page: Comprehensive reporting and visualizations
- Advanced Filtering: Filter by project type, project name, status, dates
- Full CRUD Operations: Create, read, update, delete cases
- Export Functionality: CSV and Excel export with filter preservation
- Search: Full-text search across case fields
- Status Workflow: Active β FΓ¦rdigmeldt β Closed
- Comprehensive Views: Complete case information display
- Registration Tracking: Dynamic field registration (BBR status, etc.)
- Timeline View: Activity history and event tracking
- Document Management: PDF generation and export
- Real-time Statistics: KPI tracking across all project types
- Trend Analysis: Monthly trends and growth metrics
- Project Distribution: Visual breakdown by project types
- Export Reports: Excel and CSV report generation
- Python 3.9+
- Node.js 18+
- Microsoft SQL Server
- Git
-
Clone Repository
git clone <repository-url> cd gidas_explorer
-
Backend Setup
# Create virtual environment python -m venv venv # Activate (Windows) venv\Scripts\activate # Install dependencies pip install -r requirements.txt
-
Frontend Setup
cd frontend npm install cd ..
-
Configuration
# Create .env file with your database credentials # See example in Installation section
-
Run Application
# Start backend (Terminal 1) cd backend uvicorn main:app --reload --port 8000 # Start frontend (Terminal 2) cd frontend npm run dev
gidas_explorer/
βββ backend/ # FastAPI backend
β βββ api/ # API endpoints
β β βββ sager.py # Case management API
β β βββ separering.py # Separation dashboard
β β βββ aabenland.py # Γ
ben Land dashboard
β β βββ dispensationssag.py # Dispensation cases
β β βββ nedsivningstilladelse.py # Permits
β β βββ reports.py # Analytics API
β β βββ forecasts.py # Forecasting
β βββ models/ # SQLAlchemy ORM models
β β βββ amo.py # AMO database models
β βββ schemas/ # Pydantic response schemas
β βββ database/ # Database session management
β βββ main.py # FastAPI application entry
βββ frontend/ # React frontend
β βββ src/
β β βββ pages/ # Page components
β β β βββ Dashboard.tsx
β β β βββ SepareringDashboard.tsx
β β β βββ AabenlandDashboard.tsx
β β β βββ DispensationssagDashboard.tsx
β β β βββ NedsivningstilladelseDashboard.tsx
β β β βββ AnalyticsPage.tsx
β β β βββ Sager/ # Case management
β β βββ components/ # Reusable UI components
β β βββ hooks/ # Custom React hooks
β β βββ types/ # TypeScript type definitions
β β βββ utils/ # Utility functions
β βββ package.json
β βββ vite.config.ts
βββ .gitignore # Git ignore rules
βββ requirements.txt # Python dependencies
βββ README.md # This file
# Database Configuration
DATABASE_URL=sqlalchemy+pyodbc://username:password@server/database
# API Configuration
API_HOST=0.0.0.0
API_PORT=8000
# Frontend Configuration
VITE_API_URL=http://localhost:8000
VITE_APP_TITLE=GIDAS ExplorerEnsure your database connection string follows this format:
sqlalchemy+pyodbc://username:password@server_name/database_name?driver=ODBC+Driver+17+for+SQL+Server
GET /api/sager- List cases with filtering and paginationGET /api/sager/{id}- Get case detailsPOST /api/sager- Create new casePUT /api/sager/{id}- Update caseGET /api/sager/export/csv- Export cases to CSVGET /api/sager/export/excel- Export cases to Excel
GET /api/dashboard/separering/stats- Separation statisticsGET /api/dashboard/aabenland/stats- Γ ben Land statisticsGET /api/dashboard/dispensationssag/stats- Dispensation statisticsGET /api/dashboard/nedsivningstilladelse/stats- Permit statistics
GET /api/reports/monthly- Monthly overviewGET /api/reports/projekttyper- Project type distributionGET /api/reports/export/excel- Export reports to Excel
The application uses a custom UI component library with:
- Cards: Structured content containers
- Buttons: Various button styles and states
- Badges: Status indicators and labels
- Tables: Sortable, paginated data tables
- Forms: Input validation and form handling
- Charts: Data visualization components
- Authentication: Session-based authentication system
- Authorization: Role-based access control
- Data Validation: Comprehensive input validation
- SQL Injection Protection: Parameterized queries
- CORS Configuration: Cross-origin resource sharing setup
# Backend code formatting
black backend/
isort backend/
flake8 backend/
# Frontend code formatting
cd frontend
npm run lint
npm run format# Backend tests
pytest backend/
# Frontend tests
cd frontend
npm test# Frontend build
cd frontend
npm run build
# Backend deployment
# Use WSGI server like Gunicorn
gunicorn backend.main:app -w 4 -k uvicorn.workers.UvicornWorker- Use environment variables for all configuration
- Ensure proper database connection pooling
- Configure reverse proxy (nginx/Apache) for production
- Set up monitoring and logging
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
[Add your license information here]
For technical support and questions:
- Create an issue in the repository
- Contact the development team