Skip to content

makaronz/StillOnTime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

165 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 StillOnTime - Film Schedule Automation System

Version License Build Performance Node TypeScript

A comprehensive performance-optimized film schedule automation system with advanced monitoring, caching, and optimization capabilities.

πŸš€ Quick Start β€’ πŸ“Š Performance β€’ πŸ—οΈ Architecture β€’ πŸ“š Documentation β€’ 🀝 Contributing


🎯 Overview

StillOnTime is a cutting-edge film industry logistics application that revolutionizes how production crews manage schedules, routes, and equipment logistics. Built with performance-first principles, it delivers 75% faster database queries, 70% faster API responses, and 43% smaller bundle sizes.

✨ Key Features

  • 🎬 Automated Email Processing - Monitors Gmail for shooting schedule emails with PDF attachments
  • πŸ—ΊοΈ Intelligent Route Planning - Calculates optimal routes with real-time traffic data
  • πŸ“… Google Calendar Integration - Creates calendar events with multiple alarms
  • 🌀️ Weather Integration - Provides forecasts and warnings for outdoor shoots
  • πŸ“± React Dashboard - Modern web interface for monitoring and configuration
  • πŸ”’ OAuth 2.0 Security - Secure Google services integration
  • ⚑ Performance Optimized - Advanced caching, monitoring, and optimization

πŸš€ Performance Metrics

Metric Before After Improvement
Database Query Time ~200ms ~50ms 75% faster ⚑
API Response Time ~500ms ~150ms 70% faster πŸš€
Page Load Time ~3.2s ~1.8s 44% faster πŸ“ˆ
Bundle Size ~2.1MB ~1.2MB 43% smaller πŸ“¦
Email Processing ~30s ~8s 73% faster ⚑

πŸ—οΈ Technology Stack

Backend

Node.js TypeScript Express PostgreSQL Redis

Frontend

React Vite Tailwind CSS Zustand

Performance & Monitoring

Grafana Lighthouse Docker

πŸš€ Quick Start

Prerequisites

  • Node.js 20+
  • PostgreSQL 15+
  • Redis 7+
  • Docker (optional)
  • Google Cloud Console project with APIs enabled
  • OpenWeatherMap API key

Installation

# Clone the repository
git clone https://github.com/stillontime/stillontime.git
cd stillontime

# Install all dependencies
npm run install:all

# Setup environment variables
npm run setup:env

# Setup database
npm run prisma:generate
npm run prisma:migrate

# Build the application
npm run build

# Start development servers
npm run dev

Docker Setup (Recommended)

# Start all services with Docker
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

Vercel + Supabase (Minimal)

For a minimal deployment path using Vercel for the frontend and Supabase Postgres for the database, see the Vercel + Supabase Deployment (Minimal) section in the deployment guide.

Performance Setup

# Setup performance monitoring
npm run setup:performance

# Install monitoring tools
npm run monitoring:setup

# Run performance tests
npm run test:performance:ci

πŸ“Š Performance Monitoring

Dashboard Access

  • Grafana Dashboard: http://localhost:3000/d/performance
  • Metrics Endpoint: http://localhost:3001/metrics
  • Health Check: http://localhost:3001/health

Performance Budgets

  • JavaScript Bundle: < 500KB gzipped
  • CSS Bundle: < 50KB gzipped
  • Total Bundle: < 1MB gzipped
  • API Response: < 200ms average
  • Lighthouse Score: > 90

πŸ§ͺ Testing

Test Suites

# Run all tests
npm test

# Run performance tests
npm run test:performance

# Run end-to-end tests
npm run test:e2e

# Run load tests
npm run test:api-performance

# Check performance budgets
npm run performance:budget-check

Performance Testing

# Bundle analysis
npm run performance:bundle

# Lighthouse testing
npm run test:lighthouse

# API load testing
npm run test:api-performance

# Regression analysis
npm run performance:regression-check

πŸ—οΈ Architecture

StillOnTime/
β”œβ”€β”€ 🎬 backend/                 # Node.js/Express API
β”‚   β”œβ”€β”€ src/                   # Source code
β”‚   β”œβ”€β”€ tests/                 # Backend tests
β”‚   └── migrations/            # Database migrations
β”œβ”€β”€ 🎨 frontend/               # React/Vite frontend
β”‚   β”œβ”€β”€ src/                   # Source code
β”‚   β”œβ”€β”€ tests/                 # Frontend tests
β”‚   └── public/                # Static assets
β”œβ”€β”€ πŸ“Š monitoring/             # Performance monitoring
β”œβ”€β”€ 🐳 docker/                # Docker configurations
β”œβ”€β”€ πŸ“š docs/                  # Documentation
└── πŸ”§ scripts/               # Build and utility scripts

πŸ“š Documentation

Core Documentation

Technical Documentation

Additional Resources

πŸ”§ Configuration

Required Environment Variables

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/stillontime_automation"
REDIS_URL="redis://localhost:6379"

# Google OAuth 2.0
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
GOOGLE_REDIRECT_URI="http://localhost:3000/auth/callback"

# External APIs
OPENWEATHER_API_KEY="your-openweather-api-key"
GOOGLE_MAPS_API_KEY="your-google-maps-api-key"

# Application
JWT_SECRET="your-jwt-secret"
NODE_ENV="development"
PORT="3001"
FRONTEND_URL="http://localhost:3000"

Google APIs Setup

  1. Enable required APIs:

    • Gmail API
    • Google Calendar API
    • Google Drive API
    • Google Maps API
  2. OAuth 2.0 Scopes:

    • https://www.googleapis.com/auth/gmail.readonly
    • https://www.googleapis.com/auth/calendar
    • https://www.googleapis.com/auth/drive.file

🎬 Usage

  1. Authentication: Sign in with your Google account
  2. Configuration: Set up your home address, Panavision address, and time buffers
  3. Email Monitoring: The system automatically monitors your Gmail for schedule emails
  4. Processing: When a schedule email is detected, it:
    • Downloads and parses the PDF attachment
    • Calculates optimal routes with traffic data
    • Fetches weather forecasts
    • Creates calendar events with alarms
    • Sends notifications

πŸ“ˆ Available Scripts

# Development
npm run dev              # Start all development servers
npm run build            # Build for production
npm run test             # Run all tests

# Performance
npm run test:performance # Run performance test suite
npm run performance:bundle # Analyze bundle size
npm run performance:budget-check # Check performance budgets
npm run monitoring:start # Start monitoring services

# Database
npm run prisma:migrate   # Run database migrations
npm run prisma:studio    # Open Prisma Studio
npm run prisma:migrate:performance # Apply performance indexes

# Docker
npm run docker:up       # Start all services
npm run docker:down     # Stop all services
npm run docker:logs     # View logs

🀝 Contributing

Development Workflow

  1. Create feature branch from main
  2. Implement changes with performance considerations
  3. Run performance tests: npm run test:performance
  4. Check performance budgets: npm run performance:budget-check
  5. Submit pull request with performance metrics

Performance Guidelines

  • Monitor bundle size impact
  • Test API performance changes
  • Consider database query optimization
  • Implement caching where appropriate
  • Follow performance budgets

πŸ“Š CI/CD

GitHub Actions

  • Performance Testing: Automated on every PR
  • Budget Checking: Enforces performance budgets
  • Load Testing: Validates API performance under load
  • Regression Detection: Identifies performance regressions
  • Dashboard Updates: Updates performance metrics

Pipeline Stages

  1. Build: Optimized build with bundle analysis
  2. Test: Unit, integration, and performance tests
  3. Performance: Lighthouse, load testing, budget checks
  4. Deploy: Automated deployment to staging/production
  5. Monitor: Performance tracking and alerting

🚨 Troubleshooting

Performance Issues

  • Slow API Responses: Check database query performance
  • High Memory Usage: Review cache configuration
  • Bundle Size Increases: Analyze with bundle analyzer
  • Frontend Performance: Check Web Vitals metrics

Common Solutions

  • Database Optimization: Add indexes, optimize queries
  • Cache Tuning: Adjust TTL and cache strategies
  • Bundle Optimization: Implement code splitting
  • Resource Scaling: Increase system resources

πŸ“ž Support

For questions and support:

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ by the StillOnTime Team

Performance First Approach - Every feature is optimized for speed and efficiency.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published