TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/reds-skywalker/Lightpress/llms.txt
Use this file to discover all available pages before exploring further.
client/ directory contains the user-facing web application for Lightpress. It is a standalone Node.js frontend project that connects to your microservices over HTTP, handles authentication flows, and delivers the interface your end users interact with. Because it is decoupled from the backend, you can iterate on the UI without touching any service logic, and deploy it independently to a CDN or container host.
Directory structure
services/ layer inside the client is where API calls to each microservice are organized. Keep HTTP logic here rather than scattering fetch calls across components — it makes it straightforward to swap base URLs between local and production environments.
Tech stack
Lightpress uses a JavaScript/TypeScript frontend. The.gitignore excludes node_modules, dist, and build, which matches the output conventions of the major React-based frameworks.
- Next.js (recommended)
- React (Vite)
- Vue / Nuxt
Next.js is the natural fit for a SaaS product on AWS. It supports server-side rendering for fast initial loads, API routes you can proxy through to microservices, and static export for CDN delivery.The development server starts at
http://localhost:3000 by default.Connecting to microservices
The client talks to the microservices backend over HTTP/HTTPS. In local development, each service exposes a port via Docker Compose. In production, requests go through an Application Load Balancer (ALB) that routes to each service by path prefix.Never hard-code service URLs in component files. Always read from environment variables so the same build artefact can target different environments without modification.
Local development workflow
Start all services with Docker Compose
From the repository root, bring up the full stack. This starts the client dev server alongside every microservice.
Or run the client standalone
If you only need to work on the UI and the backend services are already running (or you are mocking them), start just the client.
Set environment variables
Copy the example env file and point
NEXT_PUBLIC_API_URL at your local or remote microservices.Building for production
- Docker
- Static export
The
client/Dockerfile produces an optimized production image. The Docker Compose file and CodeBuild pipeline use this same image.Environment variables
Required variables
Required variables
| Variable | Description |
|---|---|
NEXT_PUBLIC_API_URL | Base URL for microservices API (ALB URL in production) |
NEXT_PUBLIC_APP_ENV | Current environment: development, staging, or production |
Optional variables
Optional variables
| Variable | Description |
|---|---|
NEXT_PUBLIC_AUTH_URL | Override for the authentication service endpoint |
NEXT_PUBLIC_SENTRY_DSN | Sentry DSN for frontend error tracking |