Development Setup
Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have the following installed:
- Node.js (version >= 20.0.0)
- npm (comes with Node.js)
- Git
- PostgreSQL (for local development)
Installation
Section titled “Installation”1. Clone the Repository
Section titled “1. Clone the Repository”git clone https://github.com/southwellmedia-dev/aether-platform.gitcd aether-platform2. Install Dependencies
Section titled “2. Install Dependencies”npm installThis will install all dependencies for the monorepo, including:
- Web application dependencies
- Plugin dependencies
- Shared package dependencies
3. Set Up Environment Variables
Section titled “3. Set Up Environment Variables”Create a .env file in the root of the project:
cp .env.example .envUpdate the following variables in your .env file:
# DatabaseDATABASE_URL="postgresql://username:password@localhost:5432/aether_dev"
# Better AuthBETTER_AUTH_SECRET="your-secret-key-here"BETTER_AUTH_URL="http://localhost:3000"
# Optional: Debug flagsNEXT_PUBLIC_SHOW_RAW_ONBOARDING=true # Show raw onboarding data in settings4. Set Up the Database
Section titled “4. Set Up the Database”Make sure PostgreSQL is running, then:
# Generate Prisma clientnpm run db:generate
# Push schema to databasenpm run db:push
# (Optional) Seed the database with test datanpm run db:seed5. Start the Development Server
Section titled “5. Start the Development Server”npm run devThis starts:
- Web app at
http://localhost:3000 - Documentation at
http://localhost:4321/docs
Project Structure
Section titled “Project Structure”aether-platform/├── apps/│ ├── web/ # Next.js web application│ └── docs/ # Starlight documentation site├── packages/│ ├── core/ # Core domain & infrastructure│ ├── database/ # Prisma schema and migrations│ ├── ui/ # Shared UI components│ ├── auth-utils/ # Authentication utilities│ └── plugins/ # Plugin packages│ ├── plugins-core/ # Plugin framework│ ├── timer/ # Timer plugin│ ├── tasks/ # Tasks plugin│ └── ...└── docs/ ├── constitution/ # Architectural documentation └── guides/ # Developer guidesDevelopment Workflow
Section titled “Development Workflow”Creating a New Plugin
Section titled “Creating a New Plugin”npm run create:pluginThis interactive script will:
- Prompt for plugin details (name, description)
- Create plugin package structure
- Generate manifest boilerplate
- Update plugin registry
Generating Plugin Manifests
Section titled “Generating Plugin Manifests”After making changes to plugin manifests:
npm run generate:manifestsThis regenerates apps/web/src/lib/plugins/manifest-registry.generated.ts
Running Checks
Section titled “Running Checks”# Type checkingnpm run typecheck
# Lintingnpm run lint
# Format codenpm run format
# Run testsnpm run testDatabase Commands
Section titled “Database Commands”# Generate Prisma clientnpm run db:generate
# Push schema changes to databasenpm run db:push
# Create a new migrationnpm run db:migrate
# Open Prisma Studio (database GUI)npm run db:studio
# Seed the databasenpm run db:seedArchitecture Checks
Section titled “Architecture Checks”Aether enforces constitutional architecture rules:
# Check domain purity (no infrastructure dependencies in domain layer)npm run check:architectureTroubleshooting
Section titled “Troubleshooting”Port Already in Use
Section titled “Port Already in Use”If port 3000 or 4321 is already in use:
# Kill all node processes (Windows)taskkill /F /IM node.exe
# Kill all node processes (Mac/Linux)killall nodeDatabase Connection Issues
Section titled “Database Connection Issues”- Ensure PostgreSQL is running
- Verify
DATABASE_URLin.env - Check database exists:
psql -U postgres -l - Create database if missing:
createdb aether_dev
Plugin Not Showing Up
Section titled “Plugin Not Showing Up”- Check plugin is enabled in Settings > Plugins
- Verify business type matches plugin requirements
- Regenerate manifests:
npm run generate:manifests - Refresh the page
Build Errors
Section titled “Build Errors”# Clean and rebuildnpm run clean:allnpm installnpm run generate:manifestsnpm run build