This is a typescript template for building Discord bots with a dashboard. It uses SvelteKit, TailwindCSS, Discord.JS, Sapphire, Authy, and Prisma.
- SvelteKit
- Typescript
- Authjs - For easy authentication
- TailwindCSS
git clone https://github.com/analog-org/analog-svelte.git
cd analog-svelte
npm i- Copy .env.exampleand paste it in the main directory
- Rename it to just .env
- Fill in the values for the environment variables
- Create an APP on Discord Developer Portal
- Create a bot user and copy the token
- Put the token you copied in the DISCORD_BOT_TOKENvariable in the.envfile
- To get the DISCORD_CLIENT_IDandNEXT_PUBLIC_DISCORD_CLIENT_IDvalues, go to the OAuth2 tab in your application and copy theClient IDvalue
- To get the DISCORD_CLIENT_SECRETvalue, go to the OAuth2 tab in your application and copy theClient Secretvalue (or reset the secret and copy the new one)
- For NEXTAUTH_SECRETyou can generate a random 32 character string by doingopenssl rand -base64 32or at generate.plus
- NEXTAUTH_URLis the URL of your website (e.g.- http://localhost:3000,- https://analog.org,- https://panel.bossdaily.me)
DISCORD_CLIENT_ID="61266727282091783"
DISCORD_BOT_TOKEN="OTI2Nnrjh9ia03ndNTIw.GjSdq1.bh2983-34yhtg9wasn9iy34ifgkaopneianwh"
NEXT_PUBLIC_DISCORD_CLIENT_ID="61266727282091783"
DISCORD_CLIENT_SECRET="uqerhgeas2HxewZQfdggK9gl-KLcnbgja"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="34gaw9jmig04jma0hi-mwaehawh-KLcnbgja":::tip ENV Variables are global You can use any ENV variables you add here anywhere in the project :::
To start the bot & the dashboard you have to be in the root directory of the project and run the following command
npm startYou can do
npm run devTo get into developer mode, meaning the bot or the dashboard restart & recompile on code changes

