Skip to content

NotUnHackable/ShipTheVibe

Repository files navigation

Next.js React TypeScript TailwindCSS Bun

πŸš€ ShipTheVibe

The Ultimate Vibe Coder's Dream Template

Build modern web applications with AI, Payments, and Authentication β€” all pre-configured and ready to ship.

Quick Start β€’ Features β€’ Tech Stack β€’ Documentation β€’ Deployment


⚑ Quick Start

Get up and running in seconds with Bun:

# Clone the repository
git clone https://github.com/AaryanBansal-dev/ShipTheVibe.git
cd ShipTheVibe

# Install dependencies with Bun (recommended)
bun install

# Or use npm
npm install

# Set up environment variables
cp .env.example .env.local

# Start the development server
bun run dev
# Or: npm run dev

Open http://localhost:3000 to see your app.


✨ Features

🎯 Core Features

  • Next.js 15 - Latest React framework with App Router and Server Components
  • TypeScript - Full type safety with strict mode enabled
  • TailwindCSS v4 - Utility-first CSS for rapid, responsive UI development
  • Bun Runtime - Blazing fast JavaScript runtime and package manager

πŸ”Œ API & Backend

  • tRPC - End-to-end typesafe APIs without code generation
  • Supabase - Open source Firebase alternative for auth & database
  • Zod - TypeScript-first schema validation

πŸ€– AI Integration

  • OpenAI API - Ready for ChatGPT and GPT-4 integration
  • Gemini API - Google's multimodal AI model support

πŸ’³ Payments

  • Polar API - Modern payment processing for SaaS products

🐳 DevOps

  • Docker - Multi-stage Dockerfile with production optimization
  • Docker Compose - Development and production configurations
  • ESLint - Code quality and consistency

πŸ§ͺ Testing

  • Jest - JavaScript testing framework
  • React Testing Library - Component testing utilities

πŸ› οΈ Tech Stack

Category Technology Version
Framework Next.js 15
Runtime React 19
Language TypeScript 5
Styling TailwindCSS 4
Package Manager Bun 1.0+
Database Supabase 2
API Layer tRPC 11
Validation Zod 3
Testing Jest 29

πŸ“ Project Structure

/ShipTheVibe
β”œβ”€β”€ /public                 # Static assets
β”œβ”€β”€ /src
β”‚   β”œβ”€β”€ /app               # Next.js App Router pages
β”‚   β”‚   β”œβ”€β”€ globals.css    # Global styles & animations
β”‚   β”‚   β”œβ”€β”€ layout.tsx     # Root layout
β”‚   β”‚   └── page.tsx       # Homepage
β”‚   β”œβ”€β”€ /components        # Reusable React components
β”‚   β”‚   β”œβ”€β”€ Alert.tsx      # Alert notifications
β”‚   β”‚   β”œβ”€β”€ Avatar.tsx     # User avatars
β”‚   β”‚   β”œβ”€β”€ Badge.tsx      # Status badges
β”‚   β”‚   β”œβ”€β”€ Button.tsx     # Buttons with variants
β”‚   β”‚   β”œβ”€β”€ Card.tsx       # Card containers
β”‚   β”‚   β”œβ”€β”€ Input.tsx      # Form inputs
β”‚   β”‚   β”œβ”€β”€ Loading.tsx    # Loading spinners
β”‚   β”‚   β”œβ”€β”€ Modal.tsx      # Modal dialogs
β”‚   β”‚   └── index.ts       # Component exports
β”‚   β”œβ”€β”€ /hooks             # Custom React hooks
β”‚   β”‚   └── index.ts       # useLocalStorage, useDebounce, etc.
β”‚   β”œβ”€β”€ /lib               # Library configurations
β”‚   β”‚   └── supabaseClient.ts
β”‚   β”œβ”€β”€ /api               # tRPC configurations
β”‚   β”‚   └── trpc.ts
β”‚   β”œβ”€β”€ /pages/api         # API routes
β”‚   β”‚   └── users.ts
β”‚   β”œβ”€β”€ /utils             # Utility functions
β”‚   β”‚   └── helpers.ts     # cn, formatDate, tryCatch, etc.
β”‚   └── /types             # TypeScript definitions
β”‚       └── index.ts
β”œβ”€β”€ /tests                  # Test files
β”œβ”€β”€ .env.example           # Environment template
β”œβ”€β”€ Dockerfile             # Multi-stage Docker config
β”œβ”€β”€ docker-compose.yml     # Docker Compose config
β”œβ”€β”€ bun.lockb             # Bun lock file
β”œβ”€β”€ package.json          # Dependencies
β”œβ”€β”€ tailwind.config.js    # Tailwind configuration
β”œβ”€β”€ tsconfig.json         # TypeScript configuration
└── jest.config.mjs       # Jest configuration

πŸ“¦ Components

Button

import { Button } from '@/components';

<Button 
  label="Click me" 
  onClick={() => {}} 
  variant="primary"  // primary | secondary | outline | ghost | danger
  size="md"          // sm | md | lg
  loading={false}
/>

Card

import { Card } from '@/components';

<Card hover className="p-4">
  <h3>Card Title</h3>
  <p>Card content</p>
</Card>

Input

import { Input } from '@/components';

<Input 
  label="Email"
  placeholder="Enter your email"
  error="Invalid email"
  helperText="We'll never share your email"
/>

Modal

import { Modal } from '@/components';

<Modal 
  isOpen={isOpen} 
  onClose={() => setIsOpen(false)}
  title="Modal Title"
  size="md"  // sm | md | lg | xl
>
  <p>Modal content</p>
</Modal>

Alert, Badge, Avatar, Loading

import { Alert, Badge, Avatar, Loading } from '@/components';

<Alert variant="success" title="Success">Operation completed!</Alert>
<Badge variant="info">New</Badge>
<Avatar src="/avatar.jpg" fallback="JD" size="lg" />
<Loading size="md" text="Loading..." />

πŸͺ Custom Hooks

useLocalStorage

const [value, setValue] = useLocalStorage<string>('key', 'defaultValue');

useDebounce

const debouncedValue = useDebounce(searchTerm, 500);

useMediaQuery

const isMobile = useMediaQuery('(max-width: 768px)');

useToggle

const [isOpen, toggle, setIsOpen] = useToggle(false);

useClickOutside

const ref = useClickOutside<HTMLDivElement>(() => setIsOpen(false));

useClipboard

const [copied, copyToClipboard] = useClipboard();
await copyToClipboard('Text to copy');

useWindowSize

const { width, height } = useWindowSize();

πŸ”§ Utility Functions

cn (className merge)

import { cn } from '@/utils/helpers';
const className = cn('base-class', isActive && 'active', customClass);

formatDate

formatDate(new Date()); // "December 31, 2024"

formatCurrency

formatCurrency(29.99, 'USD'); // "$29.99"

tryCatch

const [data, error] = await tryCatch(fetchData());

Other utilities

  • generateId() - Generate unique IDs
  • sleep(ms) - Delay execution
  • truncate(text, maxLength) - Truncate text
  • capitalize(text) - Capitalize first letter
  • deepClone(obj) - Deep clone objects
  • isEmpty(value) - Check if value is empty

πŸ” Environment Variables

Copy .env.example to .env.local and configure:

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here

# OpenAI API Configuration
OPENAI_API_KEY=your_openai_api_key_here

# Gemini API Configuration
GEMINI_API_KEY=your_gemini_api_key_here

# Polar API Configuration (Payment Processing)
POLAR_API_KEY=your_polar_api_key_here

πŸ“œ Available Scripts

Command Description
bun run dev Start development server
bun run build Build for production
bun run start Start production server
bun run lint Run ESLint
bun run test Run tests
bun run test:watch Run tests in watch mode

πŸ’‘ All commands also work with npm run instead of bun run


🐳 Docker Deployment

Development with Docker Compose

docker-compose up

Production Deployment

docker-compose --profile production up app-prod

Build Docker Image Manually

docker build -t ship-the-vibe .
docker run -p 3000:3000 ship-the-vibe

πŸš€ Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Configure environment variables in Vercel dashboard
  4. Deploy automatically on every push

Docker

Deploy to any cloud provider that supports Docker:

  • AWS ECS / Fargate
  • Google Cloud Run
  • Azure Container Apps
  • DigitalOcean App Platform
  • Railway
  • Fly.io

πŸ§ͺ Testing

# Run all tests
bun run test

# Run tests in watch mode
bun run test:watch

# Run with coverage
bun run test --coverage

πŸ“– API Configuration

Supabase Client

// src/lib/supabaseClient.ts
import { createClient } from '@supabase/supabase-js';

export const supabase = createClient(
  process.env.NEXT_PUBLIC_SUPABASE_URL!,
  process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
);

tRPC Setup

// src/api/trpc.ts
import { initTRPC } from '@trpc/server';
import { z } from 'zod';

const t = initTRPC.create();

export const appRouter = t.router({
  getUser: t.procedure
    .input(z.string())
    .query((opts) => {
      return { id: opts.input };
    }),
});

export type AppRouter = typeof appRouter;

βœ… Success Criteria

  • Fully functional Next.js 15 application with TypeScript
  • Modern TailwindCSS v4 with custom animations
  • Supabase client for authentication and database
  • tRPC setup for type-safe API communication
  • Multi-stage Docker configuration for dev and production
  • Comprehensive UI component library
  • Custom hooks collection
  • Utility functions
  • Type definitions for common data structures
  • Bun as primary package manager
  • Jest testing setup with React Testing Library

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

MIT License - see the LICENSE file for details.


Built with πŸ’œ by Aaryan Bansal

Happy Shipping! πŸš€

About

Vibe Coder's Dream Template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •