Prerequisites
Before you begin, ensure you have the following tools installed:Docker
Required for running local databases and services
Doppler
Secret management for environment variables
AWS CLI
For AWS service integration and deployment
Just
Task runner for development commands
sqlx-cli
Database migration management
Pulumi CLI
Infrastructure as code management
Rust & Cargo
For building backend services
Bun
For frontend development
Initial Setup
Step 1: Environment Configuration
Export the SOPS KMS ARN for secret decryption:You can skip this step if you’re using
nix-shellStep 2: One-Command Setup
Run the complete setup process:LocalStack Setup
Starts LocalStack for local AWS emulation and creates:
- SQS queues for async processing
- DynamoDB tables for connection tracking
- S3 buckets for file storage
Running the Application
Backend Services
Start all backend services using Docker Compose:By default,
convert_service and search_processing_service are not run locally as they are not needed by the frontend when using dev assets.Rebuilding Services
If you’ve updated a service and need to rebuild the Docker image:Stopping Services
To stop all running services:Frontend Application
Run the frontend pointed to local services:- Install frontend dependencies
- Start the development server
- Connect to locally running backend services
Database Management
Setting Up Individual Databases
If you need to set up databases separately:Running Databases Only
To run just the databases without other services:LocalStack (Local AWS)
Macro uses LocalStack to emulate AWS services locally:Manual LocalStack Setup
notification-queuepush-delivery-queueemail-service-backfill-queuedelete-chat-handler-queuecontacts-queueconvert-service-queuesearch-event-queue- And more…
bulk-uploadconnection-gateway-tablestatic-file-metadata
macro-email-attachmentsdoc-storagedocx-uploadstatic-file-storagebulk-upload-staging
Individual LocalStack Commands
FusionAuth Setup
Manage the authentication service:Building Services
Build All Services
Build Lambda Functions
just build_document_text_extractorjust build_docx_unzip_handlerjust build_delete_chat_handlerjust build_upload_extractor_lambda_handlerjust build_email_suppressionjust build_deleted_item_poller
Type Check Without Building
Testing
Setup Test Environment
Test Individual Services
Test a specific service from therust/cloud-storage/ directory:
Environment Management
Macro uses encrypted environment files managed by SOPS:Get Environment Variables
.env-local.enc and creates .env with your AWS credentials from ~/.aws/credentials.
Edit Environment
Fix Environment (Re-encrypt)
Docker Cache Management
Clear All Build Cache
Clear Only Rust Target Caches
View Cache Usage
Cleanup
Destroy all local infrastructure:- Destroy FusionAuth infrastructure
- Stop and remove all Docker containers
- Remove Docker volumes
Next Steps
Architecture
Learn about the system architecture
Directory Structure
Understand the codebase organization