๐Ÿ“ฆ syhner / elysia-kickstart

ElysiaJS boilerplate with HTMX, Tailwind, Auth.js, Drizzle, CI. Deploy in one click to Railway or Vercel Edge Functions

โ˜… 138 stars โ‘‚ 31 forks ๐Ÿ‘ 138 watching
authjsboilerplatebundockerdrizzleelysiajsgithub-actionshtmxtailwindcsstursovercel-edge-functions
๐Ÿ“ฅ Clone https://github.com/syhner/elysia-kickstart.git
HTTPS git clone https://github.com/syhner/elysia-kickstart.git
SSH git clone git@github.com:syhner/elysia-kickstart.git
CLI gh repo clone syhner/elysia-kickstart
Siraj Siraj update README 787d404 2 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ .vscode
๐Ÿ“ api
๐Ÿ“ docker
๐Ÿ“ public
๐Ÿ“ scripts
๐Ÿ“ src
๐Ÿ“ types
๐Ÿ“„ .dockerignore
๐Ÿ“„ .eslintrc.json
๐Ÿ“„ .gitignore
๐Ÿ“„ .prettierignore
๐Ÿ“„ .prettierrc.json
๐Ÿ“„ bun.lockb
๐Ÿ“„ bunfig.toml
๐Ÿ“„ drizzle.config.ts
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ tailwind.config.ts
๐Ÿ“„ tsconfig.json
๐Ÿ“„ vercel.json
๐Ÿ“„ README.md

elysia-kickstart

Feature packed ElysiaJS boilerplate. Edge ready. Deploy with one click.

Taken inspiration from https://github.com/ethanniser/the-beth-stack.

๐Ÿ“š Features

Core

  • ๐Ÿ—๏ธ TypeScript - Configured to maximize type safety
  • ๐Ÿ‰ ElysiaJS - Fast and Bun friendly server framework
  • ๐Ÿ“ HTMX - High power tools for HTML
  • ๐Ÿ’ฝ Drizzle - ORM with maximal type safety
  • ๐Ÿ”’ Auth.js - Flexible and secure authentication
  • ๐Ÿ”— integrates with Drizzle to store auth data

Development

Deployment

  • ๐Ÿณ Docker - (local and production) Docker-compose and Dockerfiles for running anywhere
  • ๐Ÿ”„ GitHub Actions - Robust CI/CD

๐ŸŒฑ Getting started

๐Ÿš€ Option 1: Clone and deploy

  • To Railway (deployed with Docker)
Deploy on Railway

  • To Vercel Edge Functions (see the Railway template for required environment variables, as well as RUNTIME=edge)
Vercel

๐Ÿ“‹ Option 2: Clone and run locally

  • Fork this repository (uncheck 'Copy the main branch only if you are interested in other branches / feature sets) 2. Clone your new repository 3. Install dependencies and run the development server - with [bun](https://bun.sh/docs/installation) %%CODEBLOCK0%% - or with [Docker](https://docs.docker.com/get-docker/) %%CODEBLOCK1%% ## โš™๏ธ Configuration ### [Docker](https://www.docker.com/) - [.dockerignore](.dockerignore) - [docker/](docker/) - Dockerfile and docker-compose.yml for development and production ### [Drizzle](https://orm.drizzle.team/) - [src/db/](src/db/) - [src/lib/db.ts](src/lib/db.ts) - [drizzle.config.ts](drizzle.config.ts) ### [ESLint](https://eslint.org/) - [.eslintrc.json](.eslintrc.json) ### [GitHub Actions](https://github.com/features/actions) - [.github/workflows/ci.yml](.github/workflows/ci.yml) - type-checking and linting (hence these errors are ignored in [next.config.mjs](next.config.mjs)) ### [HTMX](https://htmx.org/) - [public/htmx@1.9.5.min.js](public/htmx@1.9.5.min.js) - [types/htmx.d.ts](types/htmx.d.ts) - typed HTMX attributes for intellisense and autocompletion ### [NextAuth](https://next-auth.js.org/) - [src/app/api/auth/index.ts](src/app/api/auth/index.ts) - [src/app/components/auth.tsx](src/app/components/auth.tsx) - [src/db/schemas/auth.ts](src/db/schemas/auth.ts) โ€” store auth data (users, accounts, sessions, verification tokens) in database - [src/hooks/isAuthenticated.ts](src/hooks/isAuthenticated.ts) - [src/lib/auth.ts](src/lib/auth.ts) ### [Prettier](https://prettier.io/) - [.eslintrc.json](.eslintrc.json) - [.prettierignore](.prettierignore) - [.prettierrc.json](.prettierrc.json) ### [Tailwind CSS](https://tailwindcss.com/) - [src/styles/globals.css](src/styles/globals.css) - [tailwind.config.js](tailwind.config.js) ### [TypeScript](https://www.typescriptlang.org/) - [tsconfig.json](tsconfig.json) - configured for maximum type-safety - [types/reset.d.ts](types/reset.d.ts) - using [ts-reset](https://github.com/total-typescript/ts-reset) to increase type-safety ### [Vercel Edge Functions](https://vercel.com/features/edge-functions) - [api/index.tsx](api/index.tsx) - [scripts/transform-paths.ts](scripts/transform-paths.ts) - transforms all relative imports to absolute imports inside the src/ directory - [vercel.json](vercel.json) ### [VS Code](https://code.visualstudio.com/) - [.vscode/extensions.json`](.vscode/extensions.json) - recommended workspace extensions