Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xulioc/sveltekit-multitenant-rbac

Svelte MultiTenant RBAC Dashboard
https://github.com/xulioc/sveltekit-multitenant-rbac

dashboard drizzle-orm formsnap lucia-auth multitenancy rbac shadcn-ui superforms svelte sveltekit

Last synced: 1 day ago
JSON representation

Svelte MultiTenant RBAC Dashboard

Awesome Lists containing this project

README

        

# Svelte MultiTenant RBAC Dashboard


One more Svelte starter, now with Multi-Tenancy and Role Based Access Control

![dashboard](https://github.com/xulioc/sveltekit-multitenant-rbac/blob/main/static/images/dashboard.png?raw=true)

---

##



DISCLAIMER: This project is not production ready. Svelte5 is not stable and RBAC is not fully tested. Use at your own risk.

## Features

- Authentication (Email & GitHub OAuth)
- [Multitenancy](https://github.com/xulioc/sveltekit-multitenant-rbac/blob/main/static/doc/MT.md) (Groups & Organizations)
- [Role Based Acces Control](https://github.com/xulioc/sveltekit-multitenant-rbac/blob/main/static/doc/RBAC.md) (RBAC)
- [Soft deletion](https://en.wiktionary.org/wiki/soft_deletion)
- User tracking

## Technologies

- [Svelte5](https://svelte.dev/) and [SvelteKit](https://kit.svelte.dev/) application framework
- [PostgreSQL](https://www.postgresql.org/) relational database
- [DrizzleKit](https://orm.drizzle.team/) TypeScript ORM on top of PortgreSQL
- [Lucia](https://lucia-auth.com/) auth library
- [TailwindCSS](https://tailwindcss.com/) CSS framework
- [Shadcn-svelte](https://www.shadcn-svelte.com/) UI component library
- [Superforms](https://superforms.rocks/) form validation and SSR submission
- [Formsnap](https://www.formsnap.dev/) form building
- [Layerchart](https://www.layerchart.com/) charts
- [Lucide Icons](https://lucide.dev/) icon pack
- [Resend](https://resend.com/) email service API
- [Umami](https://umami.is/) analytics
- [Vercel](https://vercel.com/) deployment platform

## Installation

### Clone the repo

```bash
git clone https://github.com/xulioc/sveltekit-multitenant-rbac.git
cd sveltekit-multitenant-rbac
```

### Setup environment variables

Create a new `.env` file

```bash
cp .env.example .env
```

Edit your `.env` file

```bash
# MANDATORY VARIABLES
PRIVATE_POSTGRES_URL="postgresql://"

```

### Initialize database

```bash
pnpm db:generate
pnpm db:push
```

To start in development mode:

```bash
pnpm dev
```

To build and start in production mode:

```bash
pnpm build
pnpm preview
```

### Deploy

To deploy to Vercel please follow instructions [here](https://vercel.com/guides/deploying-svelte-with-vercel).

## Contribute

Feel free to contribute. Issues and Pull Requests are welcome.

## License

[MIT](https://github.com/xulioc/sveltekit-multitenant-rbac/blob/main/LICENSE)

## Resources

| Link | |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [sveltekit-auth](https://github.com/delay/sveltekit-auth) | ![GitHub Repo stars](https://img.shields.io/github/stars/delay/sveltekit-auth?style=flat) |
| [sveltekit-supabase-dashboard](https://github.com/xulioc/sveltekit-supabase-dashboard) | ![GitHub Repo stars](https://img.shields.io/github/stars/xulioc/sveltekit-supabase-dashboard?style=flat) |
| [auth-sveltekit](https://github.com/daedalus-developers/auth-sveltekit/) | ![GitHub Repo stars](https://img.shields.io/github/stars/edwardspresume/sveltekit-lucia-auth-v3-example?style=flat) |
| [sveltekit-lucia-auth-v3-example](https://github.com/edwardspresume/sveltekit-lucia-auth-v3-example) | ![GitHub Repo stars](https://img.shields.io/github/stars/daedalus-developers/auth-sveltekit?style=flat) |
| [sveltekit-stackter](https://github.com/shamscorner/sveltekit-stackter) | ![GitHub Repo stars](https://img.shields.io/github/stars/shamscorner/sveltekit-stackter?style=flat) |
| [saas-starter](https://github.com/startino/saas-starter) | ![GitHub Repo stars](https://img.shields.io/github/stars/startino/saas-starter?style=flat) |
| [sveltekit-starter-svelte5](https://github.com/szig83/sveltekit-starter-svelte5) | ![GitHub Repo stars](https://img.shields.io/github/stars/szig83/sveltekit-starter-svelte5?style=flat) |
| https://www.shadcn-svelte.com/blocks |
| https://dev.to/permify/implementing-role-based-access-control-in-sveltekit-56hf |