Host it for your team, your friends, or your company. Each developer gets their own account, isolated databases, and API keys. No vendor lock-in.
# You need: # 1. Node.js 18+ installed # 2. A PostgreSQL 15+ cluster (can be local or remote) # 3. Git # Check your setup: node --version # v18+ required psql --version # PostgreSQL client
# Clone Aethelos Base git clone https://github.com/aethelos/base.git cd base # Install dependencies npm install
# Copy the example env file cp .env.example .env.local # Edit .env.local: # ── Metadata database (stores projects, users, API keys) ── DATABASE_URL=postgresql://aethelos:secret@localhost:5432/aethelos_base # ── Cluster admin (used to provision new databases) ── PG_CLUSTER_URL=postgresql://admin:secret@localhost:5432/postgres # ── Paystack (optional — for paid upgrades) ── NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY=your-paystack-public-key PAYSTACK_SECRET_KEY=your-paystack-secret-key # ── App URL ── NEXT_PUBLIC_APP_URL=https://your-domain.com
# Create the metadata database createdb aethelos_base # Run the schema migration psql -d aethelos_base -f src/sql/schema.sql # This creates: # • baas_projects — project registry # • baas_tables_schema — table definitions # • baas_api_metrics_logs — API telemetry # • developers — user accounts # • sessions — auth sessions # • api_keys — project API keys
# Development mode npm run dev # Production build npm run build npm start # Aethelos Base is now running at: # → http://localhost:3000
# ── Option A: VPS (DigitalOcean, Hetzner, AWS EC2) ── # 1. Provision a VPS with PostgreSQL 15 # 2. Clone the repo, set DATABASE_URL and PG_CLUSTER_URL # 3. Run: npm run build && npm start # 4. Use a reverse proxy (nginx/Caddy) with SSL # ── Option B: Docker ── FROM node:20-alpine WORKDIR /app COPY package*.json ./ RUN npm ci --production COPY . . RUN npm run build EXPOSE 3000 CMD ["npm", "start"] # docker build -t aethelos-base . # docker run -p 3000:3000 \ # -e DATABASE_URL=postgresql://... \ # -e PG_CLUSTER_URL=postgresql://... \ # aethelos-base # ── Option C: Vercel / Railway ── # Push to GitHub, connect to Vercel/Railway, # set environment variables, deploy. # Note: You still need a PostgreSQL cluster # (Neon, Supabase PG, or self-hosted).
# Once deployed, share the URL: # → https://base.your-domain.com/signup # Each developer: # 1. Creates their own account # 2. Gets isolated projects & databases # 3. Generates their own API keys # 4. Has full REST API access # Everyone is fully isolated: # • Separate accounts # • Separate projects # • Separate PostgreSQL databases # • Separate API keys # • Separate telemetry
┌─────────────────────────────────────────────────────────┐
│ Aethelos Base Server │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────────┐ │
│ │ Portal │ │ REST API │ │ SDK Generator │ │
│ │ (Next.js)│ │ /api/v1 │ │ /api/v1/sdk │ │
│ └────┬─────┘ └────┬─────┘ └──────────┬───────────┘ │
│ │ │ │ │
│ ┌────┴──────────────┴────────────────────┴───────────┐ │
│ │ DataStore Interface │ │
│ │ (auth, projects, tables, API keys, metrics) │ │
│ └────────────────────┬───────────────────────────────┘ │
└───────────────────────┼──────────────────────────────────┘
│
┌───────────────┼───────────────┐
│ │ │
┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐
│ Developer │ │ Developer │ │ Developer │
│ A's DB │ │ B's DB │ │ C's DB │
│ (isolated) │ │ (isolated) │ │ (isolated) │
└───────────┘ └───────────┘ └───────────┘