Skip to content

Front-End Template design with company theme and brand. Web3 optional.

License

Notifications You must be signed in to change notification settings

compute-labs-dev/frontend-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

create-computelabs-app

πŸš€ Create modern web applications with Compute Labs in seconds. Choose from four specialized templates: Standard Web2, AI-Structured, Web3, or the powerful AI + Web3 combined template.

npm version License Node Version PRs Welcome

CLI Prompt Example

Features

✨ Four Specialized Templates

  • Standard Web2: Next.js with theming, i18n, and Redux
  • AI-Structured: Multi-provider AI integration (OpenAI, Anthropic, Gemini, Ollama)
  • Web3: Solana blockchain with wallet connectivity and DeFi components
  • AI + Web3 Combined: Full-stack powerhouse with both AI and blockchain features

🎨 Built-in Features

  • Compute Labs branding and design system
  • Light/dark mode with next-themes
  • Internationalization (8 languages)
  • TypeScript for type safety
  • Tailwind CSS for styling
  • Redux Toolkit for state management
  • ESLint & Prettier configured

Quick Start

Using npx (recommended)

npx create-computelabs-app my-app
cd my-app
npm install
npm run dev

Using npm

npm create computelabs-app@latest my-app
cd my-app
npm install
npm run dev

Using yarn

yarn create computelabs-app my-app
cd my-app
yarn
yarn dev

The CLI will guide you through selecting and configuring your template.

Template Options

🌐 Standard Web2

Perfect for traditional web applications with modern features:

  • Next.js 14 with App Router
  • Redux Toolkit for state management
  • Internationalization ready (8 languages)
  • Theme switching (light/dark mode)
  • Responsive design with Tailwind CSS

πŸ€– AI-Structured

Build AI-powered applications with multiple LLM providers:

  • Providers: OpenAI, Anthropic, Google Gemini, Ollama (local)
  • Features: Chat interface, streaming responses, cost tracking
  • Components: Pre-built chat UI, model selector, message handling
  • API Routes: Ready-to-use endpoints for chat and completions
  • Demo Page: Interactive AI playground at /ai-demo

πŸ”— Web3

Create blockchain applications on Solana:

  • Wallet Support: Phantom, Backpack, OKX
  • DeFi Components: Token swap interface with slippage control
  • Utilities: Transaction helpers, token operations, RPC management
  • Networks: Mainnet, Testnet, Devnet support
  • Demo Page: Token swap interface at /swap

πŸš€ AI + Web3 Combined

The ultimate full-stack template combining AI and blockchain:

  • All AI Features: Multi-provider LLMs, streaming chat, API endpoints
  • All Web3 Features: Solana integration, wallet support, DeFi components
  • Unified Interface: Seamless integration of AI and blockchain features
  • Use Cases: AI trading bots, smart contract analysis, DeFi assistants
  • Demo Pages: Both /ai-demo and /swap included

Project Structure

my-app/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/              # Next.js App Router
β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”œβ”€β”€ lib/              # Utilities and configurations
β”‚   β”œβ”€β”€ store/            # Redux store
β”‚   └── assets/           # Images, fonts
β”œβ”€β”€ public/               # Static files
β”œβ”€β”€ .env.local           # Environment variables
└── package.json         # Dependencies

Configuration

Environment Variables

Each template generates appropriate .env.local and .env.example files:

AI Template:

OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AI...
OLLAMA_HOST=http://localhost:11434

Web3 Template:

NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_RPC_URL=https://api.devnet.solana.com

AI + Web3 Combined Template:

# AI Configuration
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AI...
OLLAMA_HOST=http://localhost:11434

# Web3 Configuration
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_RPC_URL=https://api.devnet.solana.com

Testing

Before deploying or publishing:

# Run automated tests
node test-templates.js

# Manual testing (see TESTING.md for full guide)
node create.js test-project
cd test-project
npm install
npm run dev

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development

# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/computelabs-template.git

# Create a feature branch
git checkout -b feature/amazing-feature

# Make changes and test
node test-templates.js

# Submit a pull request

Documentation

Support

License

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

Acknowledgments

  • Next.js team for the amazing framework
  • Vercel for hosting and deployment
  • Solana Labs for blockchain infrastructure
  • OpenAI, Anthropic, and Google for AI capabilities
  • The open-source community for invaluable contributions

Built with ❀️ by Compute Labs

About

Front-End Template design with company theme and brand. Web3 optional.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •