Overview
Sciety is built with TypeScript and runs in Docker containers for local development. The application uses event sourcing with PostgreSQL for data persistence and is designed to be developed using ensemble programming practices.Requirements
Before you begin, ensure you have the following installed:Docker
Required for containerized development
Docker Compose
Orchestrates multi-container setup
GNU Make
Build automation tool
Node.js
JavaScript runtime (check
.nvmrc for version)Git LFS
For large file storage (visual regression tests)
coreutils
For the
timeout commandSciety requires a Unix-like operating system (Linux, macOS, or WSL on Windows).
Quick Start
Configure environment variables
Create a Edit
.env file based on the example:.env and configure the following:Environment Variables Reference
Environment Variables Reference
| Variable | Purpose | Default |
|---|---|---|
USE_STUB_ADAPTERS | Use mock external services | false |
USE_STUB_AVATARS | Bypass external avatar calls | false |
USE_STUB_LOGIN | Enable login with userId only | false |
DISPLAY_LAST_SERVER_STARTUP | Show server restart time | true |
LOG_LEVEL | Logging verbosity (debug, info) | debug |
SCIETY_TEAM_API_BEARER_TOKEN | API authentication token | secret |
Set up external service credentials (optional)
For full functionality, you’ll need credentials from the Sciety 1Password vault:
- GCP Key
- API Tokens
Create a GCP service account key for NCRC evaluations:
- Visit GCP Console
- Create and download a new key
- Save it as
.gcp-ncrc-key.jsonin the project root
Run the application
Start the development environment:The application will be available at http://localhost:8080
The first run will take several minutes as Docker builds the images and installs dependencies.
Development Workflow
Auto-restart on Changes
Containers automatically restart on most code changes. If they don’t restart:Changes to
package.json or other configuration files typically require a manual restart.Populating the Database
On first run, the database will be empty. To populate it with evaluation data:Ingestion Options
Ingestion Options
Control what gets ingested with environment variables:
Database Access
Access the PostgreSQL database directly:Development Modes
Standard Development Mode
Fast Mode (Experimental)
Stub Mode
Production Mode
Troubleshooting
Containers won't start
Containers won't start
- Check Docker is running:
docker ps - Clean existing containers:
make stop - Remove old volumes:
docker compose down --volumes - Rebuild:
make dev
Port 8080 already in use
Port 8080 already in use
Stop any existing Sciety containers:
Database connection errors
Database connection errors
The database container may not be ready. Wait for the “healthy” status:Or use the wait script:
Missing content in the UI
Missing content in the UI
The database is likely empty. Run ingestion:
Git LFS files not downloading
Git LFS files not downloading
Ensure Git LFS is installed and initialized:
Next Steps
Testing Guide
Learn about running tests and ensuring code quality
Contributing
Understand the team’s development practices
Domain Events
Explore the event sourcing architecture
Operations
Learn about deployment and production environment