A modern workflow automation platform built with Next.js, featuring AI-powered workflow execution, subscription management, and comprehensive monitoring.
- Workflow Management: Create, edit, and manage automated workflows
- AI-Powered Execution: Execute workflows using Google's Gemini AI models
- User Authentication: Secure authentication with Better Auth (email/password)
- Subscription Management: Integrated with Polar for subscription handling
- Background Jobs: Inngest integration for reliable workflow execution
- Error Monitoring: Sentry integration for error tracking and monitoring
- Type-Safe API: tRPC for end-to-end type safety
- Modern UI: Built with shadcn/ui components and Tailwind CSS
- Framework: Next.js 15.5.4 (App Router)
- Language: TypeScript
- Database: PostgreSQL with Prisma ORM
- Authentication: Better Auth with Polar integration
- API: tRPC v11
- State Management: TanStack Query (React Query)
- Components: shadcn/ui (Radix UI primitives)
- Styling: Tailwind CSS v4
- Icons: Lucide React
- Fonts: Geist Sans & Geist Mono
- AI: Google Generative AI (Gemini 2.5 Flash)
- Background Jobs: Inngest
- Error Tracking: Sentry
- Subscriptions: Polar.sh
- Notifications: Sonner (toast notifications)
- Linting/Formatting: Biome
- Process Management: mprocs
- Package Manager: npm
- Node.js 20+
- PostgreSQL database
- npm, yarn, pnpm, or bun
nodebase/
βββ prisma/
β βββ schema.prisma # Database schema
β βββ migrations/ # Database migrations
βββ public/ # Static assets
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ (auth)/ # Authentication routes
β β βββ (dashboard)/ # Dashboard routes
β β β βββ (editor)/ # Workflow editor
β β β βββ (rest)/ # Other dashboard pages
β β βββ api/ # API routes
β βββ components/ # React components
β β βββ ui/ # shadcn/ui components
β βββ features/ # Feature modules
β β βββ auth/ # Authentication
β β βββ subscription/ # Subscription management
β β βββ workflows/ # Workflow feature
β βββ generated/ # Generated Prisma client
β βββ hooks/ # React hooks
β βββ inngest/ # Inngest functions
β βββ lib/ # Utility libraries
β βββ trpc/ # tRPC setup and routers
βββ biome.json # Biome configuration
βββ components.json # shadcn/ui configuration
βββ mprocs.yaml # Process management config
βββ next.config.ts # Next.js configuration
git clone <repository-url>
cd nodebasenpm installCreate a .env file in the root directory with the following variables:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/nodebase"
# Better Auth
BETTER_AUTH_SECRET="your-secret-key"
BETTER_AUTH_URL="http://localhost:3000"
# Polar (Subscription Management)
POLAR_ACCESS_TOKEN="your-polar-access-token"
POLAR_WEBHOOK_SECRET="your-polar-webhook-secret"
POLAR_SUCCESS_URL="http://localhost:3000/dashboard"
# Google AI (Gemini)
GOOGLE_GENERATIVE_AI_API_KEY="your-google-ai-api-key"
# Sentry (Error Tracking)
SENTRY_DSN="your-sentry-dsn"
SENTRY_ORG="js-mastery-x1"
SENTRY_PROJECT="nodebase"
SENTRY_AUTH_TOKEN="your-sentry-auth-token"
# Inngest
INNGEST_EVENT_KEY="your-inngest-event-key"
INNGEST_SIGNING_KEY="your-inngest-signing-key"# Generate Prisma client
npx prisma generate
# Run migrations
npx prisma migrate dev
# (Optional) Open Prisma Studio to view data
npx prisma studionpm run dev:allTerminal 1 - Next.js:
npm run devTerminal 2 - Inngest Dev Server:
npm run inngest:devNavigate to http://localhost:3000
The app will automatically redirect to /workflows (configured in next.config.ts).
npm run dev- Start Next.js development server with Turbopacknpm run build- Build the application for productionnpm run start- Start the production servernpm run lint- Run Biome linternpm run format- Format code with Biomenpm run inngest:dev- Start Inngest development servernpm run dev:all- Run all services using mprocs
The application uses the following main models:
- User: User accounts with authentication
- Session: User sessions for authentication
- Account: OAuth and email/password accounts
- Verification: Email verification tokens
- Workflow: User-created workflows
The app uses Better Auth with:
- Email/password authentication
- Auto sign-in after registration
- Session management
- Integration with Polar for subscription-based features
Subscription features are managed through Polar.sh:
- Checkout flow for "Nodebase-Pro" subscription
- Customer portal access
- Webhook handling for subscription events
Workflows are executed using Inngest functions with AI integration:
- Background job processing
- Google Gemini AI for workflow steps
- Telemetry and monitoring
The project uses shadcn/ui components built on Radix UI primitives. All components are located in src/components/ui/.
Sentry is configured for:
- Client-side error tracking
- Server-side error tracking
- Source map uploads
- Performance monitoring
- Linting: Biome for fast linting and formatting
- Type Safety: Full TypeScript coverage
- API Safety: tRPC for type-safe API calls
npm run buildEnsure all environment variables are set in your production environment.
Run migrations in production:
npx prisma migrate deploy- Better Auth: Authentication and session management
- Polar.sh: Subscription and payment processing
- Inngest: Background job processing
- Sentry: Error tracking and monitoring
- Google AI: AI-powered workflow execution
- tRPC: Type-safe API layer
- Create a feature branch
- Make your changes
- Run linting and formatting:
npm run lint && npm run format - Submit a pull request
Built with using Next.js, TypeScript, and modern web technologies.