Stack Templates

Pre-configured templates for Flutter, Next.js 15, FastAPI, and Material Design 3. Generate production-ready code instantly.


Mobile Feature Template

Flutter + Riverpod patterns for cross-platform mobile apps.

Technology Stack:

Flutter, Riverpod, Go Router, Hive, Dio

Example Usage:

/feature "Build mobile profile screen"

Template Includes:

Riverpod state management

Go Router navigation

Material Design 3 widgets

Hive local storage

Dio HTTP client

Error handling patterns

Web Page Template

Next.js 15 App Router patterns for modern web applications.

Technology Stack:

Next.js 15, React 18, App Router, Server Components

Example Usage:

/feature "Build web dashboard page"

Template Includes:

App Router file structure

Server Components by default

Client Components when needed

NextAuth.js authentication

API route patterns

Metadata and SEO

Backend API Template

FastAPI + SQLAlchemy + Pydantic patterns for Python backends.

Technology Stack:

FastAPI, SQLAlchemy 2.0, Pydantic v2, Alembic

Example Usage:

/feature "Build user API endpoints"

Template Includes:

FastAPI route structure

SQLAlchemy 2.0 async models

Pydantic v2 validation

Alembic migrations

JWT authentication

Error handling middleware

Design System Template

Material Design 3 components, color schemes, and accessibility guidelines.

Technology Stack:

Material Design 3, WCAG, Custom Themes

Example Usage:

/design "Create unique color scheme for app"

Template Includes:

Custom Material Design 3 themes

UNIQUE color palettes (not generic)

Dynamic color systems

WCAG accessibility compliance

Responsive layouts

Signature interactions

📝 Code Examples

Flutter Mobile Feature
// Riverpod state provider
final userProvider = StateNotifierProvider<UserNotifier, User>((ref) {
  return UserNotifier();
});

// Screen with Go Router
class ProfileScreen extends ConsumerWidget {
  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final user = ref.watch(userProvider);

    return Scaffold(
      appBar: AppBar(title: Text('Profile')),
      body: // Material Design 3 UI
    );
  }
}
Next.js 15 App Router Page
// app/dashboard/page.tsx
export const metadata = {
  title: 'Dashboard',
  description: 'User dashboard',
};

export default async function DashboardPage() {
  // Server Component by default
  const data = await fetchData();

  return (
    <div>
      <h1>Dashboard</h1>
      <ClientComponent data={data} />
    </div>
  );
}
FastAPI Backend Endpoint
# Pydantic schema
class UserCreate(BaseModel):
    email: EmailStr
    password: str

# FastAPI endpoint
@router.post("/users", response_model=User)
async def create_user(
    user: UserCreate,
    db: AsyncSession = Depends(get_db)
):
    # SQLAlchemy 2.0 async
    new_user = User(**user.dict())
    db.add(new_user)
    await db.commit()
    return new_user
Material Design 3 Custom Theme
// UNIQUE color scheme (not generic)
final customColorScheme = ColorScheme.fromSeed(
  seedColor: Color(0xFFFF6B9D), // Brand primary
  brightness: Brightness.dark,
);

// Material Design 3 theme with custom personality
final theme = ThemeData(
  colorScheme: customColorScheme,
  useMaterial3: true,
  // Custom typography, shapes, elevations
);

🔗 Full Stack Integration

Example: Building a complete user authentication feature

/feature "Build user authentication with Google OAuth" Agent will create: 1. Backend (FastAPI): - /api/v1/auth/google endpoint - User model with SQLAlchemy - JWT token generation - Pydantic schemas 2. Web (Next.js): - /app/auth/signin page - NextAuth.js Google provider - Session management - Protected routes 3. Mobile (Flutter): - Google Sign-In UI - Token storage with Hive - Auth state with Riverpod - Protected screens

🐳 Docker Templates

RAPIDS enforces Docker-first architecture for all deployments:

Next.js Dockerfile
FROM node:20-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci

FROM node:20-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build

FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]
FastAPI Dockerfile
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
HEALTHCHECK CMD curl --fail http://localhost:8000/health
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

📂 Template Locations

Templates are stored globally and loaded automatically by agents:

~/.claude/prompts/
├── mobile-feature.md      # Flutter patterns
├── web-page.md            # Next.js patterns
├── backend-api.md         # FastAPI patterns
└── design-system.md       # Material Design 3