Skip to content

tyler6204/Boilerplate2026

Repository files navigation

πŸš€ Boilerplate 2026

A modern, production-ready monorepo boilerplate featuring Next.js, Expo, and Convex. Start building full-stack applications with web and mobile support in minutes.

TypeScript Next.js Expo Convex pnpm

✨ Features

  • 🎯 Full-Stack Ready - Next.js web app + Expo mobile app + Convex backend
  • 🎨 Shared Design System - Unified theme and components across web and mobile
  • ⚑ Type-Safe - End-to-end TypeScript with shared types
  • πŸ”₯ Modern Stack - React 19, Next.js 16, Expo Router, Tailwind CSS
  • πŸ“¦ Monorepo - pnpm workspaces for efficient dependency management
  • 🎭 UI Components - Pre-built shadcn/ui components for web
  • πŸ“± Native Components - Custom native components for mobile
  • πŸš€ Zero Config - Pre-configured with best practices
  • πŸ” Production Ready - ESLint, TypeScript, and optimized builds

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

For mobile development:

  • Expo CLI (optional, included in dependencies)
  • iOS Simulator (macOS only) or Android Studio (for Android)

πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/yourusername/boilerplate-2026.git
cd boilerplate-2026

2. Install Dependencies

pnpm install

3. Set Up Environment Variables

Copy the example environment file and fill in your values:

cp .env.example .env.local

Edit .env.local and add your configuration:

# Convex
CONVEX_DEPLOYMENT=
NEXT_PUBLIC_CONVEX_URL=

# Add your other environment variables here

4. Set Up Convex

If you're using Convex, initialize it:

pnpm exec convex dev

Follow the prompts to create a new Convex project or link to an existing one.

5. Start Development

Choose one of the following options:

Option A: Run Everything

pnpm dev:all

This starts the website, mobile app, and Convex backend simultaneously.

Option B: Run Website Only

pnpm dev:website

Starts the Next.js website and Convex backend.

Option C: Run Mobile (iOS)

pnpm dev:mobile:ios

Starts the Expo mobile app (iOS) and Convex backend.

Option D: Run Mobile (Android)

pnpm dev:mobile:android

Starts the Expo mobile app (Android) and Convex backend.

πŸ“± Mobile Development

Running on iOS Simulator (macOS)

From the root directory:

pnpm dev:mobile:ios

This starts the mobile app (iOS) and Convex backend together.

To run only the mobile app without Convex:

pnpm dev:mobile-only:ios

Running on Android Emulator

From the root directory:

pnpm dev:mobile:android

This starts the mobile app (Android) and Convex backend together.

To run only the mobile app without Convex:

pnpm dev:mobile-only:android

Running on Physical Device

  1. Install the Expo Go app on your device
  2. Start the development server from the root:
    pnpm dev:mobile-only:ios
    # or
    pnpm dev:mobile-only:android
  3. Scan the QR code with Expo Go (iOS) or the Expo app (Android)

Alternatively, you can run from the mobile directory:

cd mobile
pnpm start

Running Mobile Web Version

From the mobile directory:

cd mobile
pnpm web

🌐 Web Development

The website runs on http://lvh.me:3000 by default.

  • Development: http://lvh.me:3000
  • Hot Reload: Enabled with Turbopack
  • TypeScript: Full type checking

πŸ—οΈ Project Structure

boilerplate-2026/
β”œβ”€β”€ website/          # Next.js web application
β”œβ”€β”€ mobile/           # Expo React Native application
β”œβ”€β”€ shared/           # Shared code, types, and constants
β”œβ”€β”€ convex/           # Convex backend functions
└── package.json      # Root workspace configuration

πŸ“¦ Available Scripts

Root Level

Command Description
pnpm dev:all Start website, mobile, and Convex
pnpm dev:website Start website and Convex
pnpm dev:website-only Start only website
pnpm dev:mobile:ios Start mobile (iOS) and Convex
pnpm dev:mobile:android Start mobile (Android) and Convex
pnpm dev:mobile-only:ios Start only mobile (iOS)
pnpm dev:mobile-only:android Start only mobile (Android)
pnpm dev:convex Start only Convex
pnpm build Build website for production

Website (website/)

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm start Start production server
pnpm lint Run ESLint

Mobile (mobile/)

Command Description
pnpm start Start Expo development server
pnpm ios Run on iOS simulator
pnpm android Run on Android emulator
pnpm web Run web version
pnpm lint Run ESLint

🎨 Styling

Web (Next.js)

Uses Tailwind CSS with a shared theme system. Colors and design tokens are defined in shared/constants/theme/.

Mobile (Expo)

Uses Uniwind (Tailwind for React Native) with the same shared theme system for consistency across platforms.

πŸ”§ Configuration

TypeScript

Each package has its own tsconfig.json that extends the root configuration. The shared package is configured to be imported across workspaces.

ESLint

  • Website: Next.js ESLint config
  • Mobile: Expo ESLint config
  • Root: Shared rules

Environment Variables

  • .env.example - Template for environment variables
  • .env.local - Local development variables (not committed)

🚒 Deployment

Website (Vercel)

  1. Push your code to GitHub
  2. Import your repository in Vercel
  3. Set the root directory to website
  4. Add environment variables in Vercel dashboard
  5. Deploy!

Mobile (EAS Build)

  1. Install EAS CLI:

    npm install -g eas-cli
  2. Configure your project:

    cd mobile
    eas build:configure
  3. Build for production:

    eas build --platform ios
    eas build --platform android
  4. Submit to app stores:

    eas submit --platform ios
    eas submit --platform android

Convex

Convex automatically deploys when you push to your main branch. Configure deployment in your Convex dashboard.

🀝 Contributing

Contributions are welcome! Please follow these steps:

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

πŸ“š Learn More

πŸ› Troubleshooting

Port Already in Use

If port 3000 is already in use, you can change it in website/package.json:

"dev": "next dev --turbopack --hostname lvh.me --port 3001"

Metro Bundler Issues

Clear Metro cache:

cd mobile
pnpm start -- --reset-cache

Convex Connection Issues

Make sure your .env.local has the correct NEXT_PUBLIC_CONVEX_URL and that Convex is running.

pnpm Issues

If you encounter dependency issues:

rm -rf node_modules
rm pnpm-lock.yaml
pnpm install

πŸ“„ License

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

πŸ™ Acknowledgments

  • shadcn/ui for the amazing component library
  • Expo for the incredible mobile development experience
  • Convex for the powerful backend platform
  • Vercel for Next.js and hosting

⭐ Show Your Support

If this project helped you, please give it a ⭐ on GitHub!


Built with ❀️ using Next.js, Expo, and Convex

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published