An opinionated starter template for building full-stack applications with Effect, Convex, and Next.js.
e - effect
p - posthog
o - otel
c - convex
h - help me find something with h to cram in here
apps/main-site- Next.js 15 app with App Router, Tailwind CSS, and shadcn/ui componentsapps/discord-bot- Discord bot built with Effect and Reacord (React for Discord)
packages/confect- Effect + Convex integration layer with type-safe schemas and handlerspackages/database- Convex backend with Better Auth integrationpackages/ui- Shared React components built on Radix UI and Tailwindpackages/reacord- React renderer for Discord embeds and interactionspackages/observability- Sentry and OpenTelemetry integration for Effectpackages/convex-test- Testing utilities for Convex functions
- Effect - Type-safe functional programming
- Convex - Backend-as-a-service with real-time sync
- Next.js 15 - React framework with App Router
- Better Auth - Authentication for Convex
- Tailwind CSS - Utility-first CSS
- Radix UI - Headless UI primitives
- Discord.js - Discord API wrapper
- Turbo - Monorepo build system
- Biome - Fast linter and formatter
- Clone the repository:
git clone https://github.com/your-username/create-epoch-app.git
cd create-epoch-app- Install dependencies:
bun install- Copy the environment file and configure it:
cp .env.example .env- Set up Convex:
cd packages/database
bunx convex dev- Start development:
bun devThis starts:
- Next.js app at http://localhost:3000
- Discord bot (if configured)
- Convex dev server
├── apps/
│ ├── discord-bot/ # Discord bot with Effect + Reacord
│ └── main-site/ # Next.js frontend
├── packages/
│ ├── confect/ # Effect + Convex integration
│ ├── convex-test/ # Convex testing utilities
│ ├── database/ # Convex backend + auth
│ ├── observability/ # Sentry + OpenTelemetry
│ ├── reacord/ # React for Discord
│ └── ui/ # Shared UI components
└── scripts/ # Build and setup scripts
The confect package provides type-safe Convex RPC functions with Effect:
import { createRpcFactory, makeRpcModule } from "@packages/confect/rpc";
import { Effect, Schema } from "effect";
import { ConfectMutationCtx, confectSchema } from "../confect";
const factory = createRpcFactory({ schema: confectSchema });
export const postsModule = makeRpcModule({
create: factory.mutation(
{ payload: { title: Schema.String }, success: Schema.String },
(args) =>
Effect.gen(function* () {
const ctx = yield* ConfectMutationCtx;
const id = yield* ctx.db.insert("posts", { title: args.title });
return id;
}),
),
});Build Discord UIs with React components:
import { Button, Container } from "@packages/reacord";
function WelcomeMessage({ username }: { username: string }) {
return (
<Container>
<h1>Welcome, {username}!</h1>
<Button label="Get Started" onClick={() => console.log("clicked")} />
</Container>
);
}Authentication is pre-configured with Better Auth for Convex:
import { useSession } from "@packages/ui/components/convex-client-provider";
function Profile() {
const { data: session } = useSession();
if (!session) return <SignInButton />;
return <div>Hello, {session.user.name}</div>;
}bun dev # Start all apps in development
bun build # Build all packages
bun typecheck # Type check all packages
bun test # Run tests
bun lint # Lint with Biome
bun lint:fix # Fix lint issuesFSL-1.1-MIT - Functional Source License with MIT future license.