We welcome contributions to the Discord Webhook Manager project! By contributing, you help us improve and expand this project for everyone.
Please take a moment to review this document to make the contribution process as smooth as possible.
Your contributions are invaluable to the Discord Webhook Manager project! By contributing, you help us:
- Improve and Expand: Add new features, fix bugs, and enhance existing functionality.
- Learn and Grow: Collaborate with other developers and learn new skills.
- Make an Impact: Help create a better tool for Discord server administrators and users.
We appreciate your time and effort, and we're excited to have you as part of our community!
Please note that this project is released with a Contributor Code of Conduct. By participating in this project, you agree to abide by its terms.
If you find a bug, please open an issue on GitHub. When reporting a bug, please include:
- A clear and concise description of the bug.
- Steps to reproduce the behavior.
- Expected behavior.
- Screenshots or error messages if applicable.
- Your environment details (OS, Node.js version, browser, etc.).
We love new ideas! If you have a suggestion for an enhancement or a new feature, please open an issue on GitHub. Describe your idea clearly and explain why you think it would be beneficial.
If you're looking for a good place to start contributing, check out our Good First Issues on GitHub. These are tasks specifically designed for new contributors to get familiar with the codebase.
- Next.js
- React
- TypeScript
- TanStack Query
- Radix UI
- Tailwind CSS
The backend is built with a modern and scalable technology stack:
- Framework: Fastify
- Language: TypeScript
- Database: MongoDB
- ODM: Mongoose
- Authentication: JWT (JSON Web Tokens)
- File Storage: Cloudinary
- Logging: Winston
- Environment Variables: Dotenv
- Discord Webhook Library: We maintain our own in-house library for handling Discord webhook interactions. If you need to add a feature that requires changes to the webhook functionality, you may need to contribute to this library as well. You can find the repository here: discord-webhook-library.
- Workflow for Library Changes: If your contribution requires changes to the
discord-webhook-library, please open a Pull Request in that repository first. Once those changes are merged and a new version is released, you can then update the dependency in this project and proceed with your contribution here.
- Workflow for Library Changes: If your contribution requires changes to the
- Node.js (v16 or higher)
- MongoDB (local installation or MongoDB Atlas)
- pnpm (recommended package manager for this project)
-
Clone the repository
git clone <your-repo-url> cd discord-webhook-manager
-
Install dependencies for the entire project
pnpm install
-
Set up environment variables for the backend Navigate to
apps/backendand copy the example environment file:cd apps/backend cp .env.example .envEdit the
.envfile with your configuration. Essential variables include:Discord OAuth Credentials: You must create your own Discord application at https://discord.com/developers/applications and obtain your Client ID, Client Secret, and set up a Redirect URI.
Cloudinary Credentials: You must create a Cloudinary account at https://cloudinary.com/ and obtain your credentials.
Mongodb Credentials: You need mongodb installed locally or in the cloud. You can use MongoDB Atlas or MongoDB Community for a free tier.
PORT=4000 FRONTEND_URL=http://localhost:3000 SALT_ROUNDS=10 NODE_ENV=development MONGO_URL=mongodb://localhost:27017/discord-webhook-manager JWT_SECRET=your-super-secret-jwt-key DISCORD_CLIENT_ID=your_discord_client_id DISCORD_CLIENT_SECRET=your_discord_client_secret DISCORD_REDIRECT_URI=http://localhost:4000/api/auth/discord/callback # Frontend callback URL CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret GOOGLE_OAUTH_REDIRECT_URI=http://localhost:4000/api/auth/google/callback GMAIL_REFRESH_TOKEN=your_gmail_refresh_token FROM_EMAIL=your_email@gmail.com
-
Set up environment variables for the frontend Navigate to
apps/weband copy the example environment file:cd apps/web cp .env.example .envEdit the
.envfile with your configuration. Essential variables include:NODE_ENV=development NEXT_PUBLIC_API_URL=http://localhost:4000/api # Or your deployed backend URL
NEXT_PUBLIC_API_URLshould point to your backend API. During local development, this will typically behttp://localhost:4000/api. -
Start MongoDB (if using local installation)
- Recommendation for Windows Users: For a simpler setup, especially on Windows, consider using MongoDB Atlas (MongoDB's cloud service). You can create a free-tier cluster and obtain a connection string. Update your
MONGODB_URLinapps/backend/.envwith this connection string.
# macOS with Homebrew brew services start mongodb-community # Ubuntu/Debian sudo systemctl start mongod # Or use Docker docker run -d -p 27017:27017 --name mongodb mongo:latest
For detailed local installation instructions for Windows, please refer to the official MongoDB documentation.
- Recommendation for Windows Users: For a simpler setup, especially on Windows, consider using MongoDB Atlas (MongoDB's cloud service). You can create a free-tier cluster and obtain a connection string. Update your
From the root of the project:
To run both frontend and backend in development mode (using Turborepo):
pnpm devAlternatively, you can run them separately:
Backend Development:
cd apps/backend
pnpm devFrontend Development:
cd apps/web
pnpm devBuild the entire project:
pnpm buildrun
pnpm devThe swaggerUI will be available on http://localhost:{PORT}/docs
npx typedoc --out docs/ --entryPointStrategy expand --exclude "**/*.test.ts" --exclude "**/*.test.tsx" --exclude ".next/**/*" src/Static HTML Files will be available in web/docs directory
-
Fork the repository: Start by forking the
discord-webhook-managerrepository to your GitHub account. -
Clone your fork:
git clone https://github.com/YOUR_USERNAME/discord-webhook-manager.git cd discord-webhook-manager -
Install dependencies: This project uses
pnpm.pnpm install
-
Create a new branch from
development:- Important: All new features and bug fixes should be branched off the
developmentbranch. Do NOT branch directly fromlaunchpad(our production branch).
git checkout development git pull origin development # Ensure your development branch is up-to-date git checkout -b feature/your-feature-name # or git checkout -b bugfix/your-bug-fix-name
- Important: All new features and bug fixes should be branched off the
-
Make your changes: Implement your feature or bug fix.
- Ensure your code adheres to the existing coding style. We use ESLint and Prettier.
- Write clear, concise, and well-documented code.
- Add or update tests for your changes.
-
Run tests:
pnpm test # or navigate to specific app and run pnpm test
-
Format and lint your code:
pnpm format:check # Check for formatting issues pnpm format # Fix formatting issues pnpm lint # Check for linting issues pnpm lint:fix # Fix linting issues
(These commands assume you have root-level scripts configured in
package.jsonorturbo.jsonto run these across the project, or you can run them withinapps/weborapps/backenddirectories.) -
Commit your changes: Write a clear and descriptive commit message.
A note on pre-commit checks: This project uses a pre-commit hook to ensure code quality and consistency. When you try to commit, it will automatically run ESLint and Prettier on all staged files. If any linting errors are found or files need reformatting, the commit will be aborted. You will need to fix the reported issues and
git addthe files again before you can successfully commit.git commit -m "feat: Add new feature X" # or git commit -m "fix: Resolve bug Y"
-
Push to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request (PR) to
development:- Go to the original
discord-webhook-managerrepository on GitHub and open a new pull request from your branch. - Ensure the base branch for your PR is
development, notlaunchpad. - Provide a clear title and description for your PR.
- Reference any related issues.
- Go to the original
For detailed examples on how to use our Issue and Pull Request templates, and how to manage the CHANGELOG.md, please refer to our GitHub Contribution Guides.
By contributing to Discord Webhook Manager, you agree that your contributions will be licensed under its GNU General Public License v3.0.