Getting Started with AICodeRally

Your complete guide to setting up and building with the AICodeRally platform.

What is AICodeRally?

AICodeRally is an AI-native platform built on a 4-layer architecture:

  1. Modules – Internal capability library (donors, grants, pipeline, etc.)
  2. Ideation Studio – Turn one idea into one app (web, mobile, or website)
  3. Edge Portal – Business operations around your apps (CRM, billing, dashboards)
  4. Summit Solutions – Custom, cross-business enterprise orchestration

Learn More:

Prerequisites

Before you begin, ensure you have:

Initial Setup

1. Clone the Repository

# Clone the monorepo
git clone https://github.com/AICodeRally/aicoderally-stack.git
cd aicoderally-stack

2. Install Dependencies

# Install all packages (uses pnpm workspaces)
pnpm install

This installs dependencies for:

3. Set Up Environment Variables

Create .env.local files for each app:

Studio App (apps/studio/.env.local):

# Database (Prisma Postgres via Vercel)
DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=YOUR_KEY"
DIRECT_URL="postgres://...@db.prisma.io:5432/postgres?sslmode=require"

# NextAuth
NEXTAUTH_SECRET="your-secret-here-min-32-chars"
NEXTAUTH_URL="http://localhost:3000"

# AI (Optional)
ANTHROPIC_API_KEY="sk-ant-..."
OPENAI_API_KEY="sk-..."

See Deployment Guide for complete environment variable setup.

4. Set Up Database

cd apps/studio

# Generate Prisma client
npx prisma generate

# Push schema to database
npx prisma db push

# Seed initial data
npx prisma db seed

See Database Setup Guide for details.

5. Start Development Server

# From monorepo root - Start Studio
pnpm --filter studio dev

# Or from studio directory
cd apps/studio
pnpm dev

Visit http://localhost:3000 to see your app running!

Development Workflow

Running Different Apps

# Studio (main platform)
pnpm --filter studio dev

# Edge (SMB tier)
pnpm --filter edge dev

# Summit (Enterprise tier)
pnpm --filter summit dev

# Website (marketing)
pnpm --filter website dev

# Docs (documentation site)
pnpm --filter docs dev

Building for Production

# Build specific app
pnpm --filter studio build

# Build all apps
pnpm build

# Type check
pnpm typecheck

Understanding the Nomenclature System

AICodeRally uses a unique module naming system:

Example: nonprofit-beneficiary-crm

See Nomenclature System Guide for complete details.

Creating Your First Module

1. Define Module Metadata

Create packages/modules/my-module/index.ts:

import { RallyModule } from "@rally/core";

export const module: RallyModule = {
  meta: {
    id: "my-module",
    name: "My Module Name",
    description: "What this module does",
    version: "1.0.0",
    category: "generic",
    route: "/modules/my-module",
    tier: "studio", // or "edge", "summit"
  },
};

2. Create UI Page

Create apps/studio/app/modules/my-module/page.tsx:

export default function MyModulePage() {
  return (
    <div className="mx-auto max-w-4xl p-8">
      <h1 className="text-3xl font-bold mb-4">My Module</h1>
      <p className="text-gray-600">
        Module UI goes here
      </p>
    </div>
  );
}

3. Register Module

Add to packages/modules/index.ts:

export * from "./my-module";

4. View Your Module

Visit: http://localhost:3000/modules/my-module

Key Concepts

Monorepo Structure

aicoderally-stack/
├── apps/
│   ├── studio/          # Studio tier (community, youth, creators)
│   ├── edge/            # Edge tier (SMB transformation)
│   ├── summit/          # Summit tier (enterprise)
│   ├── website/         # Marketing site
│   └── docs/            # Documentation site
├── packages/
│   ├── modules/         # All feature modules
│   ├── core/            # TypeScript types and contracts
│   ├── ui/              # Shared UI components
│   └── connectors/      # Database, email, AI connectors
└── tools/
    ├── rally-ai/        # Multi-AI orchestration CLI
    └── scripts/         # Validation and setup scripts

Platform Architecture

Layer 1: Modules - packages/modules/*

Layer 2: Ideation Studio - apps/studiostudio.aicoderally.com

Layer 3: Edge Portal - apps/edgeedge.aicoderally.com

Layer 4: Summit Solutions - apps/summitsummit.aicoderally.com

Tech Stack

See Tech Stack Overview for complete details.

Next Steps

  1. Explore Existing Modules - Browse packages/modules/ to see patterns
  2. Read Module Tracker - See all 19 Edge modules in Master Module Tracker
  3. Set Up Database - Complete Database Setup
  4. Learn Deployment - Read Deployment Guide
  5. Join Development - See Contributing Guide

Common Commands

# Development
pnpm dev                           # Start all apps
pnpm --filter studio dev           # Start Studio only
pnpm --filter edge dev             # Start Edge only

# Building
pnpm build                         # Build all apps
pnpm --filter studio build         # Build Studio only

# Type Checking
pnpm typecheck                     # Check all TypeScript

# Database
npx prisma generate                # Generate Prisma client
npx prisma db push                 # Push schema changes
npx prisma studio                  # Open database GUI

# Multi-AI Tools
pnpm rally-ai design <feature>     # AI-powered feature design
pnpm rally-ai sprint-plan          # Generate sprint plan
pnpm rally-ai validate             # Validate before deployment

Troubleshooting

"Module not found" errors

# Regenerate Prisma client
npx prisma generate

# Reinstall dependencies
rm -rf node_modules
pnpm install

Database connection issues

# Verify environment variables
cat apps/studio/.env.local | grep DATABASE_URL

# Test database connection
npx prisma db execute --stdin <<< "SELECT 1"

Build failures

# Clear Next.js cache
rm -rf apps/studio/.next

# Clear Turbo cache
rm -rf node_modules/.cache

# Rebuild
pnpm build

Resources

Getting Help


Ready to build? Start creating your first module!