Modern web application boilerplate combining FAST Element 2.0, Fluent UI Web Components, and Fastify with a focus on developer experience and performance.
- Node.js 18.0 or higher
- npm 9.0 or higher
- Python 3.x (for documentation)
- PostgreSQL 14 or higher (optional)
# Clone repository
git clone https://github.com/Falkicon/farm.git
cd farm
# Install dependencies
npm install
# Start development servers
npm run dev
# Development
npm run dev # Start all development servers
npm run dev:frontend # Frontend only (port 3000)
npm run dev:backend # Backend only
npm run kill-ports # Kill development server ports
npm run preview # Preview production build
# Building
npm run build # Build all
npm run build:frontend # Build frontend
npm run build:backend # Build backend
npm run build:backend:skip-lib-check # Build backend skipping TypeScript library checks
npm run start # Start production server
# Testing
npm run test # Run unit tests
npm run test:safe # Run tests ignoring unhandled rejections
npm run test:ui # Run tests with UI
npm run test:coverage # Run tests with coverage
npm run test:e2e # Run end-to-end tests with Playwright
npm run test:e2e:ui # Run Playwright tests with UI
# Documentation
npm run docs # Serve documentation
npm run docs:build # Build documentation
npm run docs:deploy # Deploy to GitHub Pages
npm run docs:api # Generate API documentation
npm run docs:api:watch # Watch and generate API documentation
# Code Quality
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues
npm run format # Run Prettier
npm run format:check # Check Prettier formatting
npm run typecheck # Run TypeScript checks
# Utilities
npm run clean # Clean build artifacts
npm run clean:all # Clean everything including node_modules
- π¨ FAST Element 2.0 for high-performance web components
- π Fluent UI Web Components for beautiful, accessible UI
- π Universal Router for client-side routing
- π± Responsive design with modern CSS
- π Type-safe development with TypeScript
- π€ Provider-agnostic LLM integration (OpenAI, Azure, Anthropic, Google)
- π Standardized interfaces for text, structured data, and embeddings
- π Comprehensive testing utilities with mock responses
- π― Type-safe development with TypeScript
- π‘οΈ Built-in error handling and configuration validation
- π Performance-optimized implementations
- π High-performance Fastify server
- π Security with Helmet, CORS, and JWT
- π OpenAPI/Swagger documentation
- ποΈ Prisma for type-safe database access
- π Real-time capabilities
- π Comprehensive documentation with MkDocs
- π§ͺ Testing with Vitest and Playwright
- π Continuous Integration with GitHub Actions
- π οΈ ESLint and Prettier for code quality
- π TypeDoc for API documentation
farm/
βββ docs/ # Documentation
βββ src/
β βββ frontend/
β β βββ components/ # Web components
β β βββ styles/ # Global styles
β β βββ router/ # Client routing
β β βββ utils/ # Frontend utilities
β βββ backend/
β β βββ api/ # API routes
β β βββ services/ # Business logic
β β βββ prisma/ # Database schema
β β βββ config/ # Configuration
β βββ shared/
β βββ llm/ # LLM integration system
β β βββ core/ # Core LLM abstractions
β β βββ providers/ # Provider implementations
β β βββ types/ # Type definitions
β β βββ docs/ # LLM system docs
β βββ types/ # Shared types
β βββ utils/ # Shared utilities
βββ tests/
β βββ unit/ # Unit tests
β βββ integration/ # Integration tests
β βββ e2e/ # End-to-end tests
βββ public/ # Static assets
Visit our comprehensive documentation for:
- Getting Started Guide
- Component Documentation
- API Reference
- Development Workflow
- Deployment Guide
- Security Best Practices
- Performance Optimization
Each major module includes its own comprehensive documentation:
- LLM Module: See src/shared/llm/README.md for the LLM integration system documentation
- Theme System: See src/shared/theme/README.md for the theme system documentation
These module-specific READMEs provide detailed information about features, usage examples, and architecture. For known issues and limitations, see docs/KNOWN-ISSUES.md.
We welcome contributions! Please see our Contributing Guide for details on:
- Development Setup
- Code Style Guidelines
- Pull Request Process
- Testing Requirements
This project is licensed under the MIT License - see the LICENSE file for details.
The LLM module provides a unified interface for interacting with various Large Language Model providers:
- Support for multiple providers (OpenAI, Azure, Anthropic, Google)
- Text generation for chat and completion tasks
- Structured data generation with schema validation
- Embeddings generation for semantic search
- Streaming responses for real-time interactions
- Tool calling for function execution
- Automatic test environment detection
- Standardized mock responses for testing
- Comprehensive error handling
- Type-safe interfaces with TypeScript
import { createProvider } from '@shared/llm';
// Initialize LLM provider
const provider = createProvider({
provider: 'openai',
apiKey: process.env.OPENAI_API_KEY,
model: 'gpt-4'
});
// Generate text
const response = await provider.generateText({
messages: [
{ role: 'user', content: 'Hello, AI!' }
]
});
console.log(response.content);
See Known Issues for a list of current issues and workarounds.