Skip to content

Latest commit

 

History

History
118 lines (89 loc) · 7.42 KB

README.md

File metadata and controls

118 lines (89 loc) · 7.42 KB

Header - Dashboard

Discord Discord.js CodeQL Checks GitHub License

🤖 Self-Hosting

  1. Clone this repository git clone https://github.com/iigorkowalczyk/majo.exe.git
  2. Go to /packages/database/ directory and follow Database Setup tutorial
  3. Grab a Discord Bot token and client secret on Discord's developer portal Tutorial
  4. Add redirect URL to Discord's developer portal (https://your-website.com/api/auth/callback/discord)
  5. Create new file or edit existing .env file in root directory of the project
  6. In .env file set this values:
    • TOKEN - Discord bot token [Tutorial]
    • SECRET - Random string (min. length = 32 chars)
    • CLIENT_SECRET - Discord bot secret [Tutorial]
    • NEXTAUTH_URL - Your website URL (with protocol)
    • NEXT_PUBLIC_URL - Your website URL (with protocol)
    • HOTJAR_ID - Your Hotjar ID (optional)
    • Database URLs [Tutorial]
      • DATABASE_URL - Main database URL
      • DATABASE_URL_UNPOOLED - Direct database URL (optional)
  7. Run pnpm i to install all dependencies
  8. Go to /packages/config/ directory and change values in /configs/dashboard.js to your values
  9. Go back to main directory and run pnpm run dev --filter=dashboard or pnpm run deploy --filter=dashboard to start dashboard
  10. That's it! You can now visit your dashboard for the first time!

▲ Vercel Deploy

Deploy with Vercel

  1. Click Deploy with Vercel button above and follow instructions
  2. Go to /packages/database/ directory and follow Database Setup tutorial
  3. Grab a Discord Bot token and client secret on Discord's developer portal Tutorial
  4. Add redirect URL to Discord's developer portal (https://your-project.vercel.app/api/auth/callback/discord)
  5. In your forked repository go to /packages/config/ directory and change values in /configs/dashboard.js to your values
  6. Import this repository to Vercel (click button above)
  7. Set environment variables from your root .env file in Vercel dashboard
  8. Set Root Directory in Vercel dashboard to /apps/dashboard/ (Also include files from outside the root directory)
  9. Click Deploy button
  10. That's it! You can now visit your dashboard for the first time!

Note

Your Deploy URL for Vercel will be https://project-name.vercel.app/, but you can add your own domain in Vercel dashboard. Don't forget to add it to Discord's developer portal.

🔒 Example .env file

TOKEN=DISCORD_BOT_TOKEN
SECRET=SECRET_STRING
CLIENT_SECRET=DISCORD_BOT_SECRET
NEXTAUTH_URL=YOUR_WEBSITE_URL
NEXT_PUBLIC_URL=YOUR_WEBSITE_URL

# ... Database credentials

Warning

This file should be in root directory of the project. This file is super secret, better to not share it!


⚙️ System Requirements

Ensure your setup meets these prerequisites before setting up Majo.exe:

  • PostgreSQL 14x or higher
  • Node.js 18x or higher
  • (Any) Linux x64¹
  • ~512MB of RAM (minimum)
  • ~3GB of hard drive space (minimum)

Note

  1. Debian based distros are recommended, Dashboard can also run on Windows and MacOS but it's not recommended.

📝 Contributors

💝 Sponsors

These wonderful people and services have helped develop Majo.exe, without them this project would not exist. Thanks goes to these wonderful people!

Sponsor Description
TrestHost Logo TrestHost TrestHost is a good and powerful hosting provider providing servers from the USA and Germany. Try us out today!

⁉️ Issues

If you have any issues with the bot please create new issue here. When creating new issue please provide as much information as possible. If you can, please provide logs from console.

📥 Pull Requests

When submitting a pull request:

  • Clone the repo.
  • Create a branch off of master and give it a meaningful name (e.g. my-awesome-new-feature).
  • Open a pull request on GitHub and describe the feature or fix.

We will review your pull request as soon as possible. We might suggest some changes or improvements.

📋 License

This project is licensed under the MIT. See the LICENSE file for details