Thank you for considering contributing to AlgoHunt! We welcome all contributions, whether you're fixing bugs, adding new features, or improving documentation. Your contributions help us create a better platform for our users!
AlgoHunt is a responsive platform that offers over 150 DSA-based problems across 5+ platforms, empowering 300+ active users to enhance their data structures and algorithms (DSA) skills.
- Implemented Google login with JWT authentication to ensure user data security.
- Filters for problems based on difficulty and platform, making it easier for users to find suitable challenges.
- Efficiently maintained 150+ problems through an admin dashboard utilizing KnexJS for server-database connections and real-time updates.
- Designed a user-friendly UI/UX that boosts user retention through personalized progress tracking.
- ReactJS
- Node.js
- Express.js
- PostgreSQL
- Material UI
- Knex.js
- JavaScript
- CSS
- Google OAuth
- pgAdmin
To set up the project on your local machine, follow these steps:
-
Fork the repository:
- Click the "Fork" button at the top-right corner of this page.
-
Clone the repository:
git clone https://github.com/Jai-Marothiya/AlgoHub.git cd AlgoHub
-
For the backend (Node.js):
cd server npm install
-
For the Frontend (React.js):
cd client npm install
Both the client and server folders require a .env file for environment-specific configurations. Below are the instructions for setting up these files.
You must create a .env file in the server folder to store environment variables. Use the following template to set up your .env file:
# Server Configuration
PORT=5000
# PostgreSQL Database
DATABASE_URL=postgres://postgres:${your_pg_password}@127.0.0.1/algohub
PG_HOST="127.0.0.1"
PG_USER="postgres"
PG_PASSWORD= # Add your PostgreSQL password here
PG_DATABASE=algohub
# Google OAuth Credentials
CLIENT_ID=add your google console client id
CLIENT_SECRET=add your google console client secret
# JWT Access Key
REFRESH_SECRET_KEY=f74b5b600a2b67c4f0ed42d65bf7a14dd394fd527bb65eaf5730ac2098e6d7e2dc51e278f0235ad9f8a1cb4b6e9efddc6e348b92d6c6e771aca0ef3b4e6fcab3
You must create a .env file in the client folder to store environment variables. Use the following template to set up your .env file:
# Google auth Ceredentials
REACT_APP_CLIENT_ID=add your google console client id
You can download the current database backup using the link below:
To restore the database from the backup, you can use the following command:
psql -U [username] -d [database_name] -f server/backup.sql
-
Start the backend server:
cd server npm start
-
Start the frontend:
cd client npm start
- Open your browser and go to http://localhost:3000 to view the app.
We encourage contributions of all kinds! You don’t need to have knowledge of the entire tech stack to contribute. Here are some ways you can help:
- Bug Fixes: Identify and fix bugs.
- New Features: Implement new features based on open issues.
- Documentation: Improve the documentation to help users understand the project better.
- UI Improvements: Suggest or implement UI/UX improvements.
When working on a feature or bug fix, please create a new branch:
git checkout -b feature/your-feature-name
If you find a bug or have a feature request, please follow these steps:
- Check existing issues: Ensure your issue hasn’t already been reported.
- Submit a new issue: Use the provided issue template to describe the bug or feature.
To submit a pull request (PR), follow these steps:
-
Create a branch for your changes.
git checkout -b feature/your-feature-name
-
Make your changes and commit them:
git commit -m "Description of your changes"
-
Push to your fork:
git push origin feature/your-feature-name
-
Submit a pull request: Go to your fork on GitHub and click "Compare & pull request."
-
Provide a detailed description of what your PR does and why it's necessary.
Here’s a brief overview of the folder structure:
.
├── server/ # Backend source code
├── client/ # Frontend source code
├── README.md # Project overview
├── CONTRIBUTING.md # Contribution guidelines
├── LICENSE # Project license
└── ...
Thank you to all the contributors who have helped make AlgoHunt a better platform!