|
| 1 | +# Welcomer Bot |
| 2 | + |
| 3 | +This app was built to introduce developers to full-stack development in relation to Discord bots. The API, bot, and dashboard can be worked on independently as separate projects, so each one of them has its own README. You don't have to worry about any interlinked types, or dependencies. |
| 4 | + |
| 5 | +Before starting, make sure you have the following setup: |
| 6 | + |
| 7 | +- Node.js |
| 8 | +- npm |
| 9 | +- A MongoDB instance (could be local or using atlas) |
| 10 | +- A Redis instance (could be local or using a service like upstash) |
| 11 | +- A Discord application |
| 12 | + |
| 13 | +## API |
| 14 | + |
| 15 | +The API is the core of the stack and is responsible for handling requests from both the dashboard and the bot. In this example setup, we'll assume the URL of the API is `http://localhost:3000`. |
| 16 | + |
| 17 | +The API primarily uses: |
| 18 | + |
| 19 | +- [Express](https://expressjs.com/) for the server |
| 20 | +- [MongoDB](https://www.mongodb.com/) for the database |
| 21 | +- [Mongoose](https://mongoosejs.com/) to interact with MongoDB |
| 22 | +- [Redis](https://redis.io/) for caching |
| 23 | +- [ioredis](https://github.com/redis/ioredis) to interact with Redis |
| 24 | +- [Axios](https://axios-http.com/) for HTTP requests |
| 25 | +- [JWT](https://jwt.io/) for authentication cookies |
| 26 | +- [TypeScript](https://www.typescriptlang.org/) for type safety |
| 27 | + |
| 28 | +To setup the API, continue reading the [API README](./api/README.md). |
| 29 | + |
| 30 | +## Bot |
| 31 | + |
| 32 | +The bot only handles a handful of tasks (such as listening to events), and most of the heavy lifting is handled by the API. |
| 33 | + |
| 34 | +The bot uses: |
| 35 | + |
| 36 | +- [Discord.js](https://discord.js.org/) to interact with Discord |
| 37 | +- [CommandKit](https://commandkit.js.org/) to handle commands and events |
| 38 | +- [Axios](https://axios-http.com/) for HTTP requests |
| 39 | +- [TypeScript](https://www.typescriptlang.org/) for type safety |
| 40 | + |
| 41 | +To setup the bot, continue reading the [Bot README](./bot/README.md). |
| 42 | + |
| 43 | +## Dashboard |
| 44 | + |
| 45 | +The dashboard is the main way for server managers to configure the behavior of the bot. In this example setup, we'll assume the URL of the dashboard is `http://localhost:3001`. |
| 46 | + |
| 47 | +The dashboard uses: |
| 48 | + |
| 49 | +- [React](https://reactjs.org/) for the frontend |
| 50 | +- [Vite](https://vitejs.dev/) for the build tool |
| 51 | +- [Tailwind CSS](https://tailwindcss.com/) for styling |
| 52 | +- [DaisyUI](https://daisyui.com/) for the UI components |
| 53 | +- [Axios](https://axios-http.com/) for HTTP requests |
| 54 | +- [TanStack Query](https://tanstack.com/query) for stateful data fetching |
| 55 | +- [Jotai](https://jotai.org/) for state management |
| 56 | +- [React Router](https://reactrouter.com/) for routing |
| 57 | +- [React Toastify](https://github.com/fkhadra/react-toastify) for notifications |
| 58 | +- [TypeScript](https://www.typescriptlang.org/) for type safety |
| 59 | + |
| 60 | +To setup the dashboard, continue reading the [Dashboard README](./dashboard/README.md). |
| 61 | + |
| 62 | +> I didn't use Next.js for this project because I wanted to avoid the constant breaking changes that it's known for, as well as the fact I wanted to show how React behaves at its core. |
0 commit comments