airdate is a platform for gamers and content creators to connect, collaborate, and find gaming partners. This project uses a modern full-stack architecture with Next.js for the frontend and Go for the backend.
- Next.js 13+ (React framework)
- TypeScript
- Tailwind CSS
- Go 1.22.6
- PostgreSQL 13
- Docker
- Node.js 14+ and npm
- Go 1.22.6+
- Docker and Docker Compose
- PostgreSQL 13 (only if running without Docker)
-
Clone the repository:
git clone https://github.com/your-username/airdate.git cd airdate
-
Set up the backend:
Option A - Using Docker (Recommended):
cd backend # Create .env file for Docker cat > cmd/server/.env << EOL DB_HOST=db DB_PORT=5432 DB_USER=postgres DB_PASSWORD=password DB_NAME=pixel_and_chill JWT_SECRET=your_jwt_secret EOL # Start the services docker compose up --build
Option B - Running locally (requires PostgreSQL):
cd backend/cmd/server # Create .env.local file cat > .env.local << EOL DB_HOST=localhost DB_PORT=5432 DB_USER=postgres DB_PASSWORD=your_local_password DB_NAME=pixel_and_chill JWT_SECRET=your_jwt_secret EOL # Create database in PostgreSQL psql -U postgres -c "CREATE DATABASE pixel_and_chill;" # Run the server go run main.go
-
Set up the frontend:
cd frontend npm install npm run dev
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
Option A - Using Docker:
cd backend
docker compose up --build # Start with logs
# OR
docker compose up --build -d # Start in background
docker logs -f backend-app-1 # View logs when running in background
Option B - Running locally:
cd backend/cmd/server
go run main.go
cd frontend
npm run dev
The backend supports two environment configurations:
cmd/server/.env
- Used with Docker Compose:
DB_HOST=db
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=password
DB_NAME=pixel_and_chill
JWT_SECRET=your_jwt_secret
cmd/server/.env.local
- Used for local development:
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_local_password
DB_NAME=pixel_and_chill
JWT_SECRET=your_jwt_secret
- User registration and authentication
- Profile management
- Connect Twitch and Discord accounts
- Find gaming partners
- Collaborate on content creation
GET /api/health
- Health checkPOST /api/register
- User registrationPOST /api/login
- User loginGET /api/profile
- Get user profile (protected)POST /api/connect/twitch
- Connect Twitch account (protected)POST /api/connect/discord
- Connect Discord account (protected)GET /api/games/search
- Search games (protected)