How lanthoiba2022/academicomeback works
Project type and purpose
• This is a full-stack, single-page web application (“AcademiComeback”) built with React/TypeScript (Vite) on the frontend and Supabase as its backend (Auth, Database, Realtime, Storage).
• Key features suggested by the file tree: authenticated study rooms with chat, calendars, quizzes, analytics dashboards, gamification, file storage, and a premium subscription system.
File structure
• Top-level files & dirs:
• index.html, main.tsx, App.tsx → entry point for the React SPA
• src/components, src/pages, src/contexts, src/hooks, src/lib, src/utils → modular React architecture (UI components, page views, state contexts, custom hooks, external-service wrappers, utilities)
• supabase/migrations & .bolt/supabase_discarded_migrations → database schema migrations
• setup-chat-system.js → possibly automates Supabase realtime/chat setup
• netlify.toml → deployment config on Netlify
• .env.example → environment variable template for Supabase, RevenueCat, etc.
README for additional insights
• The README only gives the name “AcademiComeback,” but the file structure reveals the full-stack nature, the use of Supabase, and the feature set.
Main components & their interactions
a. Frontend (React SPA)
• Pages: Landing, Pricing, AuthModal
• Feature modules: Dashboard, Calendar, Quiz, Study Rooms (chat + task timers), Analytics, Files, Premium
• Context providers: AuthContext, ChatContext, PremiumContext
• UI library: custom Button, Card, Modal, etc.
b. API / Backend service (Supabase)
• Auth: sign-up, sign-in, RLS policies
• Database: Postgres tables for users, rooms, chat_messages, study_sessions, quizzes, achievements
• Realtime: subscriptions for chat and room updates
• Storage: file uploads/downloads via supabase.storage
c. External services
• RevenueCat (subscription management) via src/lib/revenuecat.ts
• Possibly a WebSocket server (src/lib/websocket.ts) or used in tandem with Supabase realtime
d. Hosting / Deployment
• Netlify hosting of the static frontend
• Environment variables for API keys in Netlify config
Architectural patterns & design principles
• SPA with component-based UI (separation of concerns)
• Context API for global state (Auth, Chat, Premium)
• Hooks for reusable logic (useLocalStorage, useStudyStreak, useGamification)
• BaaS (Supabase) for minimal custom backend
• Migration-driven schema (supabase/migrations)