Skip to content

Repository files navigation

SvelteStack

Build and Test codecov

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:

About

A reasonable foundation for ambitious Svelte apps.

Topics

Resources

Stars

87 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages