My opinionated template for creating fast marketing websites that can have some more flavour if you put in the work
Clone the repository and install the dependencies:
git clone https://github.com/andre-brandao/template
cd deds-template
npm install
# or
pnpm install
# or
yarn install
# or
bun install
-
DaisyUI component library
-
SvelteAnimations component library
-
Tailwind css classes but simple sometimes too simple
-
Drizzle sql orm
-
Lucia Auth auth helper for sessions
-
TRPC typesafe api
-
TRPC SvelteKit trpc svelte adapter
-
Zod Type Validations
-
LayerCHart Beutiful Charts
Briefly explain the main directories and files in your project:
- src/: Source code for your application.
- src/routes/: SvelteKit routes.
- src/lib/: Reusable modules and components.
- src/lib/components: UI Components.
- src/lib/paraglide: Translations for the app (in gitignore).
- src/lib/stores: Aplication stores (global state).
- src/lib/utils: Utils for many things
- src/lib/server/db/: Database-related scripts and schema.
- src/assets: Static Assets
- src/trpc: Server side trpc routes
- messages: translation definition
- migrations: sql migrations
Once you've cloned the project and installed dependencies with npm install
(or
pnpm install
, yarn
or bun
), start a development server:
npm run dev
To create a production version of your app:
npm run build
TODO
Drizzle ORM Commands The following commands help manage the database schema and migrations, refer to Commands Docs
Push changes to the development database: Push command is good for situations where you need to quickly test new schema designs or changes in a local development environment, allowing for fast iterations without the overhead of managing migration files.
npm run db:push
Apply database migrations:
npm run db:migrate --name <migration name>
Open Drizzle Studio:
npm run db:studio
Seed the database using faker.js:
npm run db:seed
Generate database types:
npm run db:generate
Drop the database:
npm run db:drop
Bring the database up (alias for db:push and db:migrate):
npm run db:up
Check the database schema:
npm run db:check
Feel free to submit issues or pull requests. Contributions are welcome!