This repository contains the Next.js frontend and a small Go based authentication service.
- Node.js 20+
- Go 1.21+ (optional if running the auth service via Docker)
- Docker with Compose (for containerised workflow)
Install dependencies and start the dev server:
npm install
npm run devThe application will be available at http://localhost:3000.
To run the Go auth service directly:
cd services/auth-service
go run main.goIt exposes /api/auth/login and /api/auth/health on port 8080.
All services can be started with Docker Compose:
docker-compose up --buildThis will launch:
- blackflow-dev – Next.js dev server on
localhost:3000 - auth-service – Go service on
localhost:8080 - nginx – reverse proxy for both services
To build the production image of the Next.js app:
docker build -t blackflow .Or run docker-compose up blackflow-prod to start the production container.
The infra/ directory contains an AWS CDK stack that provisions a web server
EC2 instance with an attached Elastic IP.
cd infra
npm install
npx cdk bootstrap # required once per account/region
npx cdk deployAfter deployment, the public IP of the server is emitted as the
WebServerPublicIp CloudFormation output.
The stack runs a small t3.nano EC2 instance (about US$3.80/month in
us-east-1) with an Elastic IP that is free while attached to a running
instance. This setup should remain well under US$20/month, though prices
vary by region and additional data transfer or idle Elastic IP charges may
apply.