Created by the HawksRFit Development Team at the University of North Carolina Wilmington. HawksRFit is a web-based fitness application designed for UNCW students that helps streamline workout planning at the campus recreation center. The application allows users to create workouts, check gym busyness levels, track workout streaks with friends, and stay informed about rec center updates such as broken equipment, events, and closures.
- Lead Developer: Patrick Hachicho
- Frontend: React 19, Vite, TypeScript, Tailwind CSS
- Backend: Express.js, TypeScript, Prisma ORM
- Database: PostgreSQL (RDS on AWS in production)
- Deployment: AWS EC2 + RDS, GitHub Actions CI/CD
- Container: Docker, Docker Compose
- Node.js 22+
- Docker Desktop
1. Install dependencies:
npm install
cd server && npm install2. Create server/.env:
FACILITY_API_KEY=your_api_key_here
PORT=3000
DATABASE_URL="postgresql://hawksrfit:hawksrfit@localhost:5433/hawksrfit"
3. Start the app with Docker (recommended):
docker compose -f docker-compose.dev.yml up --buildThe app will be available at http://localhost:5173.
Start the backend:
cd server
npx prisma migrate dev
npx tsx index.tsStart the frontend (in a separate terminal):
npm run devThe app is deployed on AWS:
- Live URL: https://hawksrfit.tech
- Frontend + Backend: EC2 instance (
3.209.58.122) behind Nginx - Database: RDS PostgreSQL
- SSL: Let's Encrypt certificate (auto-renews via cron)
Deployments are automatic — every merge to main triggers a GitHub Actions workflow that SSHes into EC2, pulls the latest code, and rebuilds the Docker containers.
ssh -i ~/hawksrfit-key-new.pem ec2-user@3.209.58.122
cd ~/hawksrfit
sudo /usr/local/bin/docker-compose down
sudo docker system prune -f
sudo /usr/local/bin/docker-compose up -d --buildCertificates expire every 90 days and are automatically renewed via a cron job on EC2:
0 3 * * * cd ~/hawksrfit && sudo /usr/local/bin/docker-compose run --rm certbot renew --quiet && sudo /usr/local/bin/docker-compose exec nginx nginx -s reload| Variable | Description |
|---|---|
FACILITY_API_KEY |
API key for UNCW rec center occupancy data |
PORT |
Backend server port (default: 3000) |
DATABASE_URL |
PostgreSQL connection string |
Returns the current server status. Useful for uptime checks and confirming a deployment succeeded.
Response:
{
"status": "ok",
"version": "42",
"uptime": 3600
}| Field | Description |
|---|---|
status |
Always "ok" if the server is running |
version |
Build number set by VITE_APP_VERSION at deploy time |
uptime |
Seconds the server process has been running |
- Only
@uncw.eduemail addresses are allowed to register - The backend runs Prisma migrations automatically on startup
- Live facility count data refreshes every 5 minutes on the home page
- Footer displays the current build version (auto-increments on each deploy)