Lightpress is a team project, and keeping the codebase consistent makes everyone’s life easier. This guide covers everything you need to go from a fresh clone to an open pull request: how the repository is organized, how to set up your local environment, how to name branches and write commits, and what the review process looks like.Documentation 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.
Before you start working on something non-trivial, open an issue or discuss it in the relevant channel first. This avoids duplicated effort and makes the review process smoother.
Project structure overview
Understanding where things live is the first step to contributing effectively.client/— Frontend application. Single deployable unit served from S3 + CloudFront in production.microservices/— Each subdirectory is a self-contained Node.js service with its ownpackage.json,Dockerfile, and test suite. Services communicate over HTTP.infraestructure/cloudformation/— AWS CloudFormation templates for provisioning all infrastructure. Changes here affect production resources directly.scripts/bash/— Shell scripts for operational tasks: database seeding, log tailing, environment bootstrapping.scripts/python/— Python scripts for data processing, reporting, and automation tasks.docker-compose.yml— Local development orchestration. See the Docker Compose reference for details.buildspec.yml— AWS CodeBuild pipeline configuration. See the Buildspec reference for details.
Development setup
Prerequisites
Ensure you have the following installed before cloning:
- Node.js 20+ —
node --version - npm 10+ —
npm --version - Python 3.11+ —
python3 --version - Docker Engine 24+ with the Compose plugin —
docker compose version - AWS CLI v2 —
aws --version(required for infrastructure work)
Configure environment variables
Start the local stack
http://localhost:5173 and the auth service at http://localhost:3001. Check docker compose ps to confirm all containers are healthy.Branching strategy
Lightpress follows a structured branching model. All branches are created frommain and merged back into main via pull request.
| Prefix | When to use | Example |
|---|---|---|
feature/ | New functionality or significant enhancements | feature/add-webhook-service |
bugfix/ | Non-critical bug fixes | bugfix/fix-token-expiry-calc |
hotfix/ | Urgent production fixes that cannot wait for a normal release | hotfix/fix-login-500-error |
chore/ | Dependency updates, tooling changes, refactors with no behavior change | chore/upgrade-node-20 |
docs/ | Documentation-only changes | docs/update-contributing-guide |
Commit message conventions
Lightpress follows Conventional Commits. Every commit message must follow this format:| Type | When to use |
|---|---|
feat | A new feature visible to users or other services |
fix | A bug fix |
refactor | Code change with no behavior change |
test | Adding or updating tests |
docs | Documentation changes only |
chore | Build system, dependency updates, tooling |
ci | Changes to CI/CD configuration (buildspec.yml, CodeBuild settings) |
perf | Performance improvements |
auth-service, billing-service, client, cloudformation, scripts, docker, etc.
Pull request process
Keep your branch up to date
Before opening a PR, rebase onto the latest
main to avoid merge conflicts:Self-review your diff
Read through your own changes as if you were a reviewer. Remove debug logs, commented-out code, and unrelated changes. Confirm that tests cover the new behavior.
Open the pull request
Push your branch and open a PR against
main. Fill in the PR template:- Summary — What does this change do and why?
- Testing — How did you verify it works?
- Breaking changes — Does this change any public API contract or environment variable?
- Related issues — Link to any relevant GitHub issues.
Address review feedback
Push additional commits to your branch to address reviewer comments. Do not force-push after a review has started — it makes it harder for reviewers to see what changed.
Code style
Node.js services and client (ESLint + Prettier)
All JavaScript and TypeScript code is formatted with Prettier and linted with ESLint. Configuration files live at the root of each service.- 2-space indentation
- Single quotes for strings
- Trailing commas in multi-line structures
- No unused variables (
no-unused-varsas error) - Explicit return types on exported functions (TypeScript)
- No
console.login production code — use the structured logger instead
Python scripts (Black + flake8)
Python code inscripts/python/ is formatted with Black and checked with flake8.
A
.pre-commit-config.yaml is provided in the repository. Install the hooks with pre-commit install to have formatting and linting run automatically before every commit.Running tests
Unit tests
Each microservice and the client has its own test suite using Jest (Node.js) or pytest (Python).Integration tests
Integration tests bring up a subset of the stack and exercise services through their HTTP APIs. They are slower than unit tests and are not required to pass locally, but they run in CI on every PR.CI requirements
The CodeBuild pipeline requires the following to pass before a PR can be merged:- All unit tests pass with zero failures
- Code coverage does not fall below the threshold defined in each service’s
jest.config.js - ESLint and flake8 report zero errors (warnings are allowed but should be addressed)
- Docker images build without errors