Quick Start
Quick Start
Section titled “Quick Start”Get CoogCasa running locally for development.
Prerequisites
Section titled “Prerequisites”- Node.js 18+
- npm or pnpm
- Git
- Cloudflare account (for Workers development)
Clone the Repository
Section titled “Clone the Repository”git clone https://github.com/KevinTrinh1227/CoogCasa.gitcd CoogCasaProject Structure
Section titled “Project Structure”CoogCasa/├── web/ # Main website (Astro + React)├── api/│ ├── router/ # API router worker│ └── scholarships-backend/ # Scholarships API├── bots/ # Discord bots├── docs/ # This documentation└── monitor-proxy/ # Status monitoringWebsite Development
Section titled “Website Development”Install Dependencies
Section titled “Install Dependencies”cd webnpm installEnvironment Setup
Section titled “Environment Setup”Create web/.env:
PUBLIC_SUPABASE_URL=https://phjrisqqhaqznpyeeuom.supabase.coPUBLIC_SUPABASE_ANON_KEY=your-anon-keyPUBLIC_SPORTS_API_URL=https://coog-sports-backend.coog-planner.workers.devPUBLIC_SCHOLARSHIPS_API_URL=https://coog-scholarships-backend.coog-planner.workers.devStart Development Server
Section titled “Start Development Server”npm run devThe site will be available at http://localhost:4321.
Build for Production
Section titled “Build for Production”npm run buildnpm run preview # Preview the production buildAPI Development
Section titled “API Development”Sports Backend
Section titled “Sports Backend”The sports backend is in a separate repository:
cd /path/to/coog-sports-backendnpm installnpm run devScholarships Backend
Section titled “Scholarships Backend”cd api/scholarships-backendnpm installnpm run devAPI Router
Section titled “API Router”cd api/routernpm installnpm run devTesting
Section titled “Testing”Run Tests
Section titled “Run Tests”npm run testRun Linting
Section titled “Run Linting”npm run lintDeployment
Section titled “Deployment”Website (Automatic)
Section titled “Website (Automatic)”Pushing to main branch automatically deploys to Cloudflare Pages.
Workers (Manual)
Section titled “Workers (Manual)”cd api/routernpm run deployCommon Commands
Section titled “Common Commands”| Command | Description |
|---|---|
npm run dev | Start development server |
npm run build | Build for production |
npm run preview | Preview production build |
npm run deploy | Deploy to Cloudflare |
npm run lint | Run linting |
npm run test | Run tests |
Troubleshooting
Section titled “Troubleshooting”Port Already in Use
Section titled “Port Already in Use”If port 4321 is in use, Astro will try the next available port (4322, 4323, etc.).
Supabase Connection Issues
Section titled “Supabase Connection Issues”Ensure your Supabase project is active and the anon key is correct. Check the Supabase dashboard for any service disruptions.
Build Errors
Section titled “Build Errors”- Clear the
.astrocache:rm -rf .astro - Delete node_modules:
rm -rf node_modules - Reinstall:
npm install - Try again:
npm run build
Next Steps
Section titled “Next Steps”- Architecture - Understand the system design
- API Reference - Explore the API endpoints
- Contributing - Learn how to contribute