Thanks to visit codestin.com
Credit goes to github.com

Skip to content

md069/venturesprint

 
 

Repository files navigation

hero

Create v1

An open-source starter kit based on Midday.

Website · Issues · Tech Stack · Prerequisites · Getting Started

Overview

Create v1 is a production-ready SaaS starter kit built with modern technologies. It's structured as a monorepo using Turborepo, focusing on code reusability, type safety, and scalability. The project includes everything from authentication to analytics, making it ideal for building robust SaaS applications.

Tech Stack

Core Framework & Build Tools

Frontend

Backend & Infrastructure

Developer Experience

Communication

Project Structure

.
├── apps/                        # Application workspace
│   ├── api/                    # Supabase backend
│   │   ├── migrations/        # Database migrations
│   │   └── seed/             # Seed data
│   ├── app/                   # Main SaaS application
│   │   ├── src/
│   │   ├── public/
│   │   └── .env.example
│   └── web/                   # Marketing website
│
├── packages/                    # Shared packages
│   ├── analytics/             # OpenPanel integration
│   ├── email/                 # Email templates
│   ├── jobs/                  # Background jobs
│   ├── kv/                    # Key-value storage
│   ├── logger/               # Logging utilities
│   ├── supabase/             # Database client & types
│   └── ui/                   # Shared UI components
│
└── tooling/                    # Shared configurations
    └── typescript/            # TypeScript config

Prerequisites

Before you begin, ensure you have accounts and API keys for:

  1. Development Environment

    • Bun - JavaScript runtime & package manager
    • Docker - Container platform
  2. Core Services

  3. Monitoring & Analytics

Getting Started

  1. Clone the Repository
bunx degit midday-ai/v1 v1
cd v1
  1. Install Dependencies
bun install
  1. Environment Setup
# Copy environment files
cp apps/api/.env.example apps/api/.env
cp apps/app/.env.example apps/app/.env
cp apps/web/.env.example apps/web/.env
  1. Configure Environment Variables

Required variables for each app:

apps/app/.env:

NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_KEY=
NEXT_PUBLIC_SENTRY_DSN=
RESEND_API_KEY=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
NEXT_PUBLIC_OPENPANEL_CLIENT_ID=

apps/api/.env:

SUPABASE_DB_URL=
GOOGLE_CLIENT_ID=
GOOGLE_SECRET=
  1. Development Commands
# Start all services
bun dev

# Individual services
bun dev:web    # Marketing site
bun dev:app    # Main application
bun dev:api    # API service
bun dev:email  # Email preview

# Database operations
bun migrate    # Run migrations
bun seed       # Seed database

Development Workflow

  1. Database Changes

    • Add migrations in apps/api/migrations
    • Update types in packages/supabase/types
    • Run bun migrate to apply changes
  2. Adding Features

    • Server components go in apps/app/src/app
    • Client components use 'use client' directive
    • Shared UI components go in packages/ui
  3. Environment Types

    • Add new env vars to apps/app/src/env.mjs
    • Run validation during development

Deployment

Manual Deployment

  1. Push your repository to GitHub
  2. Connect to Vercel
  3. Configure environment variables
  4. Deploy each app separately:
    • apps/web - Marketing site
    • apps/app - Main application
    • apps/api - Supabase API

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit changes
  4. Open a pull request

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Service Use Cases

Supabase

  • Authentication: Social login (Google, GitHub), magic links, and role-based access
  • Database:
    • User profiles and preferences
    • Team collaboration features
    • Subscription and billing status
  • Storage: User avatar uploads, document attachments
  • Edge Functions: Webhook handlers, third-party integrations

Trigger.dev

  • Scheduled Tasks:
    • Daily digest emails
    • Subscription renewal reminders
    • Data cleanup and maintenance
  • Event-Driven Jobs:
    • Welcome sequence after signup
    • Payment processing webhooks
    • Team invitation notifications

Upstash Redis

  • Caching:
    • API response caching
    • User session data
    • Frequently accessed settings
  • Rate Limiting:
    • API endpoint protection
    • Login attempt restrictions
    • File upload limits
  • Feature Flags:
    • A/B testing
    • Gradual feature rollouts
    • Beta user management

OpenPanel Analytics

  • User Behavior:
    • Feature usage tracking
    • Conversion funnel analysis
    • Session recordings
  • Business Metrics:
    • Subscription analytics
    • Revenue tracking
    • User retention metrics

Resend & React Email

  • Transactional Emails:
    • Welcome messages
    • Password reset
    • Team invitations
  • Marketing Communications:
    • Newsletter templates
    • Product updates
    • Feature announcements

Database Structure

Core Tables

  1. users

    • Basic profile information
    • Authentication details
    • Preferences
  2. teams

    • Team details
    • Billing information
    • Subscription status
  3. team_members

    • User-team relationships
    • Role assignments
    • Access permissions

Feature Tables

  1. projects

    • Project metadata
    • Team association
    • Collaboration settings
  2. documents

    • Content storage
    • Version control
    • Access permissions
  3. activities

    • User actions
    • System events
    • Audit logs

Common Workflows

User Onboarding

  1. User signs up with social/email
  2. Welcome email triggered
  3. Profile completion flow
  4. Team creation/joining
  5. Feature introduction tour

Team Collaboration

  1. Team creation by user
  2. Member invitations sent
  3. Role assignment
  4. Resource sharing setup
  5. Activity tracking

Subscription Management

  1. Plan selection
  2. Payment processing
  3. Feature access update
  4. Team limits adjustment
  5. Usage tracking

Content Management

  1. Document creation
  2. Storage handling
  3. Permission setting
  4. Version tracking
  5. Activity logging

About

An open-source starter kit based on Midday.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 91.4%
  • PLpgSQL 3.5%
  • JavaScript 3.1%
  • CSS 2.0%