Skip to content
View PilarSystems's full-sized avatar
🎯
Focusing
🎯
Focusing

Block or report PilarSystems

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
pilarsystems/README.md

PILAR SYSTEMS - AI-Powered Fitness Studio SaaS Platform

A fully production-ready, automated multichannel AI SaaS platform for fitness studios, built on top of a modern Next.js marketing site template.

πŸš€ Schnellstart (Quick Start)

Get the platform running locally in 5 minutes:

# 1. Clone the repository
git clone https://github.com/PilarSystems/pilarsystems.git
cd pilarsystems

# 2. Install dependencies
yarn install

# 3. Set up environment variables
cp .env.example .env.local
# Edit .env.local and fill in all required values (see ENV_SETUP.md for details)

# 4. Generate Prisma client and run migrations
npx prisma generate
npx prisma migrate dev

# 5. Create Stripe products (optional for local testing)
npx ts-node scripts/create-stripe-products.ts
# Copy the returned Price IDs to your .env.local

# 6. Start development server
yarn dev

Open http://localhost:3000 to see the marketing site.
Navigate to http://localhost:3000/signup to test the SaaS platform.

πŸ“– For detailed setup instructions, see ENV_SETUP.md


Overview

This repository contains two integrated applications:

  1. Marketing Site (src/ directory) - Modern Next.js 15 template with 20+ homepage variations
  2. SaaS Platform (app/ directory) - Complete AI-powered fitness studio management system

SaaS Platform Features

Core Platform

  • Complete Authentication System - Supabase Auth with email/password, magic link, password reset, and email verification
  • Stripe Billing Integration - Full subscription management with setup fees (BASIC €100/mo + €500 setup, PRO €149/mo + €1000 setup, WhatsApp addon €20/mo)
  • 7-Step Onboarding Wizard - Guided setup for studio information, integrations, and AI rules
  • Comprehensive Dashboard - KPIs, charts, activity timeline, and analytics

AI Automation

  • WhatsApp AI - Automated responses, lead qualification, and follow-up sequences
  • Phone AI - Missed call handling, voicemail transcription, and AI summaries
  • Email AI - Inbox classification, auto-replies, and lead conversion
  • Lead Engine - Automatic A/B/C classification and prioritization
  • Follow-up Engine - Multichannel automated sequences

Dashboard Modules

  • Leads Management - Unified inbox, detail pages, A/B/C classification
  • Messages - WhatsApp and Email unified chat with AI auto-replies
  • Phone AI - Call logs, transcripts, and AI-generated summaries
  • Calendar - Event management with Google Calendar integration
  • Growth Analytics - Conversion tracking, KPIs, and custom filters
  • Settings - Studio info, team invites, AI rules, and billing portal

Integrations

  • WhatsApp Cloud API
  • Twilio (Phone & SMS)
  • Google Calendar OAuth
  • Email IMAP/SMTP
  • n8n Automation Workflows

Marketing Site Features

  • 20+ Homepage Variations - Different layouts and styles for various business needs
  • 50+ Inner Pages - Authentication, pricing, blog, about, services, contact, and more
  • 500+ Components - Reusable React components with modern design
  • Dark/Light Mode - Seamless theme switching with next-themes
  • Smooth Animations - GSAP and Lenis for premium interactions
  • Responsive Design - Mobile-first approach with Tailwind CSS

Tech Stack

  • Frontend: Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS 4, shadcn/ui
  • Backend: Next.js API Routes, Prisma ORM
  • Database: PostgreSQL (via Supabase)
  • Authentication: Supabase Auth
  • Payment: Stripe
  • AI: OpenAI GPT-4 and GPT-4o-mini
  • Animations: GSAP 3.13, Lenis smooth scrolling
  • Maps: Leaflet with React integration
  • Deployment: Vercel

Database Schema

The platform includes 12 comprehensive database tables:

  • users, workspaces, subscriptions
  • wizard_progress, integrations
  • leads, messages, call_logs
  • followups, calendar_events
  • ai_rules, activity_logs, tasks

Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL database (or Supabase account)
  • Stripe account
  • OpenAI API key
  • Twilio account (for phone integration)
  • WhatsApp Business API access
  • Google Cloud project (for Calendar API)

Installation

  1. Clone the repository:
git clone https://github.com/PilarSystems/pilarsystems.git
cd pilarsystems
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env.local

Edit .env.local and fill in all required values (see .env.example for all 40+ required variables).

  1. Set up the database:
npx prisma generate
npx prisma migrate dev
  1. Create Stripe products:
npx ts-node scripts/create-stripe-products.ts

Add the returned price IDs to your .env.local file.

  1. Run the development server:
npm run dev

Open http://localhost:3000 in your browser.

Environment Variables

See .env.example for all required environment variables. Key variables include:

Database & Auth

  • DATABASE_URL - PostgreSQL connection string
  • NEXT_PUBLIC_SUPABASE_URL - Supabase project URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY - Supabase anonymous key
  • SUPABASE_SERVICE_ROLE_KEY - Supabase service role key

Payment

  • STRIPE_SECRET_KEY - Stripe secret key
  • STRIPE_WEBHOOK_SECRET - Stripe webhook signing secret
  • NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY - Stripe publishable key

AI & Integrations

  • OPENAI_API_KEY - OpenAI API key
  • TWILIO_ACCOUNT_SID - Twilio account SID
  • TWILIO_AUTH_TOKEN - Twilio auth token
  • WHATSAPP_API_TOKEN - WhatsApp Business API token
  • GOOGLE_CLIENT_ID - Google OAuth client ID
  • GOOGLE_CLIENT_SECRET - Google OAuth client secret

Security

  • ENCRYPTION_KEY - 64-character hex key for encrypting integration credentials
  • NEXTAUTH_SECRET - NextAuth secret for session encryption

πŸš€ Deployment

Vercel Deployment (Recommended)

  1. Push to GitHub:

    git push origin main
  2. Import to Vercel:

    • Go to Vercel Dashboard
    • Click Add New β†’ Project
    • Import your GitHub repository
    • Click Import
  3. Configure Environment Variables:

    • Go to Settings β†’ Environment Variables
    • Add ALL variables from .env.local (see ENV_SETUP.md for complete list)
    • IMPORTANT: Add variables as plain environment variables, NOT as secret references
    • Select environments: Production, Preview, Development
  4. Deploy:

    • Click Deploy
    • Wait for build to complete
    • Your app will be live at https://your-project.vercel.app
  5. Configure Webhooks:

    • Update webhook URLs in Stripe, Twilio, and WhatsApp to use your production domain
    • See ENV_SETUP.md for detailed instructions
  6. Custom Domain (Optional):

    • Go to Settings β†’ Domains
    • Add your custom domain
    • Update NEXT_PUBLIC_APP_URL environment variable

Production Checklist

Before going live, ensure:

  • All environment variables are set in Vercel
  • Database migrations have been run
  • Stripe products have been created
  • Stripe webhooks are configured
  • Twilio webhooks are configured (if using Phone AI)
  • WhatsApp webhooks are configured (if using WhatsApp AI)
  • Google Calendar OAuth is configured (if using Calendar sync)
  • Custom domain is connected (optional)
  • SSL certificate is active
  • Test signup β†’ checkout β†’ onboarding β†’ dashboard flow

πŸ“– For detailed deployment instructions, see ENV_SETUP.md

Project Structure

pilarsystems/
β”œβ”€β”€ src/                       # Marketing site (Next.js 15 template)
β”‚   β”œβ”€β”€ app/                  # Marketing pages and routes
β”‚   β”œβ”€β”€ components/           # Marketing site components
β”‚   β”œβ”€β”€ data/                 # Static content (blogs, services, team)
β”‚   └── utils/                # Marketing site utilities
β”œβ”€β”€ app/                       # SaaS Platform (Next.js App Router)
β”‚   β”œβ”€β”€ (auth)/               # Authentication pages
β”‚   β”œβ”€β”€ dashboard/            # Dashboard pages
β”‚   β”œβ”€β”€ onboarding/           # Onboarding wizard
β”‚   β”œβ”€β”€ checkout/             # Stripe checkout page
β”‚   └── api/                  # API routes
β”œβ”€β”€ components/               # SaaS platform components
β”œβ”€β”€ lib/                      # Utility libraries
β”œβ”€β”€ services/                 # Business logic services
β”œβ”€β”€ types/                    # TypeScript type definitions
β”œβ”€β”€ prisma/                   # Prisma schema and migrations
β”œβ”€β”€ scripts/                  # Utility scripts
β”œβ”€β”€ n8n-workflows/            # n8n workflow exports
└── public/                   # Static assets

Available Scripts

# Development
npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server

# Database
npx prisma generate  # Generate Prisma client
npx prisma migrate dev  # Run migrations
npx prisma studio    # Open Prisma Studio

# Stripe
npm run stripe:setup # Create Stripe products

# Code Quality
npm run lint         # Run ESLint

Support

For issues and questions:

License

Proprietary - All rights reserved


Link to Devin run: https://app.devin.ai/sessions/231e7cbe34d34249a7244e67ec0eb2a9
Requested by: Freddi LΓΆrcher (ytraide@gmail.com) / @PilarSystems

Built with ❀️ by PILAR SYSTEMS

Popular repositories Loading

  1. chatgpt chatgpt Public

  2. pilarsystems pilarsystems Public

    TypeScript

  3. xScales xScales Public

  4. Gamify Gamify Public