Linite is a Ninite-style bulk package installer for Linux distributions. Users select apps, choose their distro, and get a single install command.
Documentation: See README.md and /docs folder for detailed documentation
- Framework: Next.js 14+ (App Router)
- Database: Drizzle ORM + Turso (libSQL)
- Auth: BetterAuth
- UI: shadcn/ui + Tailwind CSS
- State: Zustand
- Storage: Vercel Blob (for app icon uploads)
- Package Manager: bun
All commands use bun instead of npm/yarn/pnpm:
bun install
bun run dev
bun add <package>The complete Drizzle schema is defined in /docs/DATABASE_SCHEMA.md. Follow it exactly. All tables use:
- CUID2 for primary keys
- SQLite dialect
- Timestamps (createdAt, updatedAt) - except
distroSourceswhich doesn't need them
- Public routes:
/api/apps,/api/distros,/api/sources,/api/categories,/api/generate - Admin routes: All CRUD operations on the above +
/api/packages,/api/distro-sources,/api/refresh,/api/upload - Auth required for all admin routes
- Image uploads: Use
/api/upload(POST to upload, DELETE to remove) - handles Vercel Blob storage - Rate limiting: All public endpoints are rate-limited using Upstash Redis (see
/docs/API_REFERENCE.md)
Follow the structure in /docs/REPOSITORY_STRUCTURE.md:
- Keep components organized by purpose (ui/, public components, admin/)
- Separate business logic into
/src/services - External API clients in
/src/services/external-apis - Keep route handlers thin, delegate to services
See /docs/API_REFERENCE.md for the /api/generate endpoint spec. The algorithm:
- Get user's distro and available sources
- For each selected app, find available packages
- Select best package per app based on source priority + user preference
- Group packages by source
- Generate install commands + setup commands
- Return warnings for unavailable packages
Integrate with Flathub, Snapcraft, Repology, and AUR. Clients go in /src/services/external-apis/. Add error handling and caching.
- Keep all documentation in the
/docsfolder - Never create markdown files in the root directory (except README.md)
- Update docs when making significant changes to architecture or APIs
Start development:
bun run devDatabase commands:
bun run db:generate # Generate migrations
bun run db:migrate # Run migrations
bun run db:push # Push schema changes
bun run db:studio # Open Drizzle Studio
bun run db:wipe # Wipe all data from database
bun run db:seed # Seed database with initial dataEnvironment variables:
bun run check-env # Validate environment setupSee .env.example for required variables. All env vars are validated using Zod on startup.
- Getting Started:
README.md - Architecture:
/docs/PROJECT_OVERVIEW.md - API Docs:
/docs/API_REFERENCE.md - Database:
/docs/DATABASE_SCHEMA.md - Environment:
/docs/ENVIRONMENT.md - Initial Data:
/docs/INITIAL_DATA.md
bun test # Watch mode
bun test:run # Run once
bun test:coverage # With coverage239 tests passing - Tests are co-located with source files (*.test.ts or *.test.tsx)