turborepo-ton-trpc Tailwind Templates

Turborepo Ton Trpc

A modern, type-safe monorepo combining Next.js, tRPC, Tailwind, and Bun, with built-in TON Blockchain integrations and Drizzle for database operations β€” ready to deploy and scale.

πŸš€ Next.js + tRPC + TON Monorepo

A modern, type-safe, and scalable monorepo template for building TON blockchain applications

Features β€’ Tech Stack β€’ Project Structure β€’ Getting Started β€’ Environment Variables β€’ Development β€’ Deployment β€’ Contributing β€’ License

πŸ‡·πŸ‡Ί Русская вСрсия


✨ Features

  • πŸ”’ Type Safety & Performance

    • Full-stack TypeScript with strict type checking
    • End-to-end type safety with tRPC
    • Optimized builds with Turborepo
    • Real-time capabilities with KeyDB pub/sub
  • 🎨 Modern UI/UX

    • Responsive design with Tailwind CSS
    • Dark/Light theme switching
    • Internationalization (i18n) support
    • Beautiful UI components from shadcn/ui
    • Loading states & error boundaries
  • 🌐 Web3 Integration

    • TON wallet connection
    • Web3 authentication
    • Transaction handling
    • Smart contract interaction
    • Blueprint - TON Smart Contracts development framework
  • πŸš€ Developer Experience

    • ESLint + Prettier configuration
    • Git hooks with Husky
  • πŸ“Š Monitoring & Analytics

    • Logging system with Pino

πŸ› οΈ Tech Stack

Frontend

  • Next.js 15 - React framework with App Router
  • React 19 - UI library
  • TailwindCSS - Utility-first CSS
  • shadcn/ui - Beautifully designed components
  • next-themes - Dark mode support
  • next-intl - i18n support

Backend

  • Bun - Ultra-fast JavaScript runtime
  • tRPC - End-to-end typesafe APIs
  • Drizzle ORM - TypeScript ORM
  • PostgreSQL - Database
  • KeyDB - High-performance Redis alternative

Web3

  • TON Connect - TON blockchain integration
  • @ton/ton - TON SDK
  • Blueprint - TON Smart Contracts development framework

DevOps & Tools

  • Turborepo - Monorepo build system
  • Bun - JavaScript runtime
  • Docker - Containerization

πŸ“¦ Project Structure

turborepo-ton-trpc/
β”œβ”€β”€ apps/                      # Application packages
β”‚   β”œβ”€β”€ web/                   # Next.js frontend application
β”‚   β”œβ”€β”€ server/                # tRPC API server
β”‚   └── blueprint/             # TON smart contracts
β”œβ”€β”€ packages/                  # Shared packages
β”‚   β”œβ”€β”€ configs/               # Shared configuration
β”‚   β”œβ”€β”€ database/              # Database schema and utilities
β”‚   β”œβ”€β”€ logger/                # Logging utilities
β”‚   └── tonconnect-ui-react/   # TON Connect React fix
β”œβ”€β”€ turbo.json                 # Turborepo configuration
└── package.json               # Root package.json

πŸš€ Getting Started

Prerequisites

πŸ’» Development

bun dev

Running Tests

bun test        # Run all tests

Linting and Formatting

bun lint     # Run ESLint
bun format   # Run Prettier

πŸ”§ Environment Variables

This project uses a single .env file in the root directory to manage all environment variables for both frontend and backend services.

  1. Copy the example environment file:

    cp .env.example .env
    
  2. Update the variables in .env as needed:

Database Configuration

  • DATABASE_URL: PostgreSQL connection string

Redis Configuration

  • REDIS_URL: Redis/KeyDB connection URL
  • REDIS_PASSWORD: Redis/KeyDB password

TON Configuration

  • NEXT_PUBLIC_TONCONNECT_MANIFEST_URL: TON Connect manifest URL

Next.js Configuration

  • NEXT_PUBLIC_API_URL: API base URL

For development, the default values in .env.example should work out of the box with the provided Docker setup.

πŸ‘₯ 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/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

πŸ“„ License

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

Top categories

Loading Svelte Themes