A professional screenplay analysis and evaluation platform powered by Claude Opus 4.1, built with SvelteKit, Python FastAPI, and MySQL.
Clone the repository:
git clone <repository-url>
cd lolita
Set up your environment variables:
cp .env.example .env
Edit the .env file with your database credentials and Anthropic API key.
./start.sh dev
This unified script will:
The application will be available at:
Development mode (both services):
./start.sh dev
Production mode (both services):
./start.sh prod
Frontend only:
./start.sh dev --frontend-only
Backend only:
./start.sh dev --backend-only
Key environment variables you need to configure:
Database Configuration:
DB_HOST: MySQL host (default: localhost)DB_USER: MySQL usernameDB_PASSWORD: MySQL password DB_NAME: MySQL database nameDB_PORT: MySQL port (default: 3306)Application Security:
SESSION_SECRET: Secret key for session encryptionAPP_URL: Your application URL (important for remote servers)AI Service:
ANTHROPIC_API_KEY: Your Anthropic API key for Claude Opus 4.1MAX_COST_PER_USER: Maximum API cost per user (default: 100.00)The application creates the following tables:
User Management:
users: User accounts with email and hashed passwordssessions: User sessions for authenticationScreenplay Analysis:
screenplays: Basic screenplay metadata and file informationscreenplay_analyses: Detailed Claude Opus 4.1 analysis results with scoresapi_costs: API usage tracking and cost monitoring per userUnified Startup (Recommended):
./start.sh dev: Start both frontend and backend in development mode./start.sh prod: Start both services in production mode./start.sh dev --frontend-only: Start only the SvelteKit frontend./start.sh dev --backend-only: Start only the Python AI backendIndividual Commands:
npm run dev: Start SvelteKit development server onlynpm run build: Build SvelteKit for productionnpm run preview: Preview SvelteKit production buildnpm run check: Run TypeScript checkingnpm run lint: Run lintingnpm run format: Format code with Prettiernpm run db:init: Initialize database tables├── src/ # SvelteKit Frontend
│ ├── lib/
│ │ ├── components/ # Reusable Svelte components
│ │ └── server/
│ │ ├── auth.ts # Authentication logic
│ │ └── db/index.ts # Database connection
│ ├── routes/
│ │ ├── api/ # SvelteKit API routes (proxy to Python)
│ │ ├── auth/ # Authentication pages
│ │ ├── dashboard/ # User dashboard
│ │ ├── screenplays/ # Screenplay management & analysis
│ │ └── +layout.svelte # Main layout
│ └── app.html # HTML template
├── python-ai-service/ # Python FastAPI Backend
│ ├── main.py # FastAPI application
│ ├── database.py # Database models and connections
│ ├── claude_analyzer.py # Claude Opus 4.1 integration
│ ├── pdf_processor.py # PDF text extraction
│ ├── cost_tracker.py # API cost monitoring
│ └── requirements.txt # Python dependencies
├── scripts/ # Database initialization scripts
├── start.sh # Unified startup script
└── .env # Environment configuration
✅ Complete AI Analysis Pipeline
✅ User Management & Cost Tracking
✅ Professional UI/UX
This platform is ready for extending with:
[Add your license information here]