A full-stack web application for creating and managing customizable impact reports for Guitars Over Guns.
This is a monorepo containing both frontend and backend:
├── client/ # React frontend (Vite)
│ ├── src/
│ │ ├── Admin/ # Admin panel for editing content
│ │ ├── components/ # UI components
│ │ └── services/ # API client services
│ └── assets/ # Static assets (fonts, images, audio)
├── server/ # Node.js/Express backend
│ └── src/
│ ├── routes/ # API endpoints
│ ├── services/ # Business logic
│ └── config/ # Database configuration
├── api/ # Vercel serverless function (production)
├── ref/ # Reference JSON data schemas
└── public/ # Static files (favicon, etc.)
- Node.js 18+
- npm
- MongoDB (local or MongoDB Atlas)
- AWS S3 bucket (for file uploads)
-
Install dependencies:
# Root (frontend) npm install # Backend cd server && npm install
-
Configure environment:
Create
server/.env:MONGO_URI=mongodb://localhost:27017/gogo-impact-report MONGO_DB_NAME=gogo-impact-report PORT=4000 SESSION_SECRET=your-secret-key-change-in-production # S3 uploads AWS_ACCESS_KEY_ID=your-access-key AWS_SECRET_ACCESS_KEY=your-secret-key AWS_REGION=us-east-1 S3_BUCKET=your-bucket-name
-
Start development servers:
# Terminal 1: Backend cd server && npm run dev # Terminal 2: Frontend npm run dev
-
Access the app:
- Frontend: http://localhost:5173
- Backend API: http://localhost:4000
- Admin Panel: http://localhost:5173/admin
This project is configured for deployment on Vercel.
Add these in Vercel Dashboard → Project Settings → Environment Variables:
| Variable | Required | Description |
|---|---|---|
MONGO_URI |
✅ | MongoDB connection string |
MONGO_DB_NAME |
Database name (default: gogo-impact-report) |
|
SESSION_SECRET |
✅ | Random string for sessions |
NODE_ENV |
✅ | Set to production |
AWS_ACCESS_KEY_ID |
For uploads | AWS access key |
AWS_SECRET_ACCESS_KEY |
For uploads | AWS secret key |
AWS_REGION |
For uploads | e.g., us-east-1 |
S3_BUCKET |
For uploads | Your S3 bucket name |
- Import the repository in Vercel
- Add environment variables
- Deploy!
The app will be available at https://your-project.vercel.app
| File | Purpose |
|---|---|
vercel.json |
Vercel deployment configuration |
api/index.ts |
Serverless function wrapping Express backend |
client/src/services/apiConfig.ts |
API URL configuration (dev vs prod) |
vite.config.ts |
Vite build configuration |
npm run dev– Start Vite dev servernpm run build– Build for productionnpm run preview– Preview production build
npm run dev– Start with hot-reloadnpm run build– Compile TypeScriptnpm start– Run compiled JavaScript
All content endpoints follow the pattern:
GET /api/impact/{section}– Fetch section contentPUT /api/impact/{section}– Update section content (requires auth)
Sections: hero, mission, population, financial, method, curriculum, impact-section, hear-our-impact, testimonials, national-impact, flex-a, flex-b, flex-c, impact-levels, partners, footer, defaults
POST /api/auth/login– Admin loginPOST /api/auth/logout– Admin logoutGET /api/auth/me– Current userPOST /api/uploads/sign– Get presigned S3 upload URLGET/POST/DELETE /api/snapshots– Version history
See server/ADMIN_SETUP.md for creating admin users.
See ref/README.md for detailed field documentation.
Source of Truth: github.com/gogo-impact/gogo-impact.github.io
This repository is maintained by Guitars Over Guns and deployed via Vercel.