sveltestack Svelte Themes

Sveltestack

A reasonable foundation for ambitious Svelte apps.

SvelteStack

A reasonable foundation for ambitious Svelte apps.

Production-ready building blocks for authentication, workspaces, members, roles, activity logs, and more.

SvelteStack Preview

✨ Overview

SvelteStack is an open-source, production-ready starter kit for building modern full-stack applications with SvelteKit and Svelte 5. It provides the essential building blocks that every real product eventually needsβ€”not a bloated template, just solid, production-ready primitives.

What's Included

SvelteStack comes with Vault, a fully-functional demo application showcasing file storage and workspace management. Use it as a starting point for your own application, extend it with new features, or study it as a learning resource.

πŸš€ Features

Core Building Blocks

  • πŸ” Authentication - Secure email/password auth with better-auth, Argon2 password hashing, and session management
  • πŸ—„οΈ Database Integration - PostgreSQL with Drizzle ORM, type-safe queries, migrations, and seeding
  • πŸ‘₯ Workspaces & Organizations - Create, organize, and manage workspaces with multi-tenant isolation
  • πŸ“§ Members & Invites - Email-based team invitations with member management and role-based access
  • πŸ“ Activity Logs - Comprehensive activity tracking and monitoring
  • πŸ“¨ Transactional Emails - Email verification, password resets, and workspace invites with Resend
  • ☁️ File Storage - S3-compatible storage with presigned URLs and Uppy integration
  • 🎨 Modern UI Kit - Pre-configured Tailwind CSS with shadcn-svelte components
  • βœ… Testing Setup - Comprehensive test coverage with Vitest and Playwright

Vault Demo Features

The included Vault application demonstrates:

  • File Management

    • Drag-and-drop file uploads
    • Direct S3 upload with presigned URLs
    • Progress tracking and error handling
    • File previews and metadata
    • Workspace-aware file organization
  • Workspace Management

    • Create and organize multiple workspaces
    • Rename and manage workspace settings
    • Multi-tenant workspace isolation
    • Access control and permissions
  • Team Collaboration

    • Invite team members via email
    • Manage workspace members
    • Cancel pending invitations
    • Member removal capabilities

πŸ› οΈ Tech Stack

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Bun >= 1.0 (recommended package manager)
  • Node.js >= 20 (required for some tooling)
  • Docker with Docker Compose (for local database)

🏁 Getting Started

Quick Start

  1. Clone the repository

    git clone https://github.com/vsamarth/sveltestack.git
    cd sveltestack
    
  2. Run the setup script

    bash scripts/setup.sh
    

    The setup script will:

    • βœ… Check all prerequisites (Node.js, Bun, Docker)
    • πŸ“¦ Install dependencies
    • πŸ” Create .env file with generated secrets
    • πŸ—„οΈ Start the PostgreSQL database
    • πŸ”„ Run database migrations
    • 🌱 Optionally seed sample data
  3. Start the development server

    bun dev
    
  4. Open your browser

    Visit http://localhost:5173 to see your app.

πŸ—οΈ Building Your Own App

Here are the key areas you can customize:

  • Branding - Replace Vault branding with your own in src/lib/config.ts
  • Database Schemas - Modify schemas in src/lib/server/db/schema/
  • UI Components - Update components in src/lib/components/
  • API Routes - Add your own routes in src/routes/
  • Email Templates - Customize emails in src/lib/emails/

πŸ§ͺ Testing

We want to ensure the foundations you build upon are always working. That's why SvelteStack ships with comprehensive integration and end-to-end tests. You can run them with:

# Run all tests
bun run test

# Run unit tests only
bun run test:unit

# Run E2E tests only
bun run test:e2e

# Run tests with coverage
bun run test:coverage

# Watch mode
bun run test:watch

Deployment

We recommend deploying to Vercel for hosting and Neon for PostgreSQL. Cloudflare R2 provides free S3-compatible storage for your file uploads.

More detailed instructions on how to set everything up are coming soon.

🀝 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.

πŸ™ Acknowledgments

SvelteStack is built with amazing open-source tools:

Top categories

Loading Svelte Themes