Skip to content

Backend API for FormSight that handles authentication event and form management attendance tracking and AI powered insight generation from open ended feedback designed to support faster and more objective decision making after events and activities.

Notifications You must be signed in to change notification settings

fajri-farid/formsight-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FormSight Backend

FormSight Banner

Backend service for FormSight - Smart Form Insight Platform with AI-powered feedback analysis.

FastAPI Python Firebase Pydantic Status


📖 About

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.

✨ Key Features (Planned)

  • 🔐 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

🛠️ Tech Stack

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

🚀 Getting Started

Prerequisites

  • Python 3.12+
  • pip package manager
  • Firebase project (optional for initial development)

Installation

# 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 8000

Server will be running at http://localhost:8000

📂 Project Structure

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

📡 API Endpoints

Currently Available

Method Endpoint Description
GET / API information
GET /health Health check
GET /api/v1/ping Ping test
GET /docs Swagger UI

⚙️ Environment Variables

# 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:5173

🧪 Development

Using Makefile

make 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

Manual Commands

# Run server
uvicorn app.main:app --reload --port 8000

# Run tests
pytest tests/ -v

# Format code
black app/
ruff check app/ --fix

Built with ❤️ using FastAPI

About

Backend API for FormSight that handles authentication event and form management attendance tracking and AI powered insight generation from open ended feedback designed to support faster and more objective decision making after events and activities.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published