Backend service for FormSight - Smart Form Insight Platform with AI-powered feedback analysis.
FormSight Backend is a FastAPI-based server that powers the FormSight Platform - a smart form insight solution. It enables teams to create feedback forms, collect responses, and automatically generate AI-powered insights from open-ended answers.
Unlike traditional form tools that focus on data collection, FormSight focuses on sense-making - helping users understand the meaning behind hundreds of text responses quickly and objectively.
- 🔐 Authentication - Firebase Auth integration with token verification
- 📁 Workspace Management - Organize events and forms in workspaces
- 📅 Event & Attendance - Track events and participant attendance
- 📝 Form Builder - Create forms with multiple question types
- 📊 Response Collection - Collect anonymous or identified responses
- 🤖 AI Insights - Generate summaries, themes, and sentiment analysis
- 📤 Export - Export responses to CSV
| Category | Technology | Description |
|---|---|---|
| Framework | FastAPI | Modern async Python web framework |
| Language | Python 3.12 | Latest stable Python version |
| Database | Firebase Firestore | NoSQL cloud database |
| Auth | Firebase Auth | User authentication |
| Validation | Pydantic 2.10 | Data validation with V2 API |
| AI | OpenAI | AI-powered insight generation |
| Deployment | Vercel | Serverless deployment |
- Python 3.12+
- pip package manager
- Firebase project (optional for initial development)
# Clone repository
git clone https://github.com/fajri-farid/formsight-backend
cd formsight-backend
# Create virtual environment
python -m venv .venv
# Activate virtual environment
# Windows
.venv\Scripts\activate
# Linux/Mac
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Setup environment
cp .env.example .env
# Edit .env with your credentials (optional)
# Run development server
uvicorn app.main:app --reload --port 8000Server will be running at http://localhost:8000
app/
├── main.py # Application entry point
├── config.py # Environment configuration
├── api/v1/ # API route handlers
├── core/ # Firebase, security, exceptions
├── models/ # Data models
├── schemas/ # Pydantic schemas
├── services/ # Business logic
└── ai/ # AI processing pipeline
tests/ # Test files
docs/ # Documentation & Postman collection
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
API information |
| GET | /health |
Health check |
| GET | /api/v1/ping |
Ping test |
| GET | /docs |
Swagger UI |
# Firebase Configuration (optional for initial development)
FIREBASE_PROJECT_ID=your-project-id
FIREBASE_PRIVATE_KEY=your-private-key
FIREBASE_CLIENT_EMAIL=your-client-email
FIREBASE_DATABASE_URL=https://your-project.firebaseio.com
# AI Configuration
OPENAI_API_KEY=your-openai-key
# App Configuration
ENVIRONMENT=development
DEBUG=True
CORS_ORIGINS=http://localhost:3000,http://localhost:5173make dev # Run development server (auto-reload)
make run # Run production server
make test # Run tests
make format # Format code (black + ruff)
make lint # Lint code (ruff + mypy)
make clean # Clean cache files# Run server
uvicorn app.main:app --reload --port 8000
# Run tests
pytest tests/ -v
# Format code
black app/
ruff check app/ --fixBuilt with ❤️ using FastAPI