This project dates back to 22nd June 2020, but was recently rebased and force updated due to some security issues.
The live version of the site can be found here↗.
Username - test
Password - test
Backend:
- Javascript (Node.js - Main)
- Express.js (Backend structure)
- Google Firestore (Database)
Frontend:
- Pug (HTML template engine)
- Bootstrap (CSS framework)
- Custom CSS
- jQuery
Others:
- Heroku - Hosting the site.
- Freenom - Domain name.
- Cloudflare - SSL certificate.
- Sentry - Error management.
- ESLint - Code formatting.
- Font Awesome - Free icons.
- Node.js - v14 or higher
- Google Firebase - Configure database.
PLEASE NOTE: In some steps, I have asked y'all to save some details or files for later. You need to make sure that they are saved in a secure place. Do not share them with anyone else and do not commit them to GitHub.
To run this site locally, follow these rules:
- Go to nodejs↗ site.
- Download and install it for your pc.
- Be sure to install v14 or higher.
- Go to firebase console↗.
- Setup a project with some basic settings.
- Click on the settings icon in the right sidebar.
- Go to Project Settings > Service Accounts
- Under the "Firebase Admin SDK", look for a "Generate new private key" button.
- Download the json configuration file.
- Go to sentry↗ and sign in.
- Setup an express project following some basic instructions.
- Save the sentry dsn url somewhere for later.
- We use Discord Webhooks to send all contact form data directly to your server.
- If you want to opt out of this step, go to src/routers/contact.js and remove the Discord Webhook section.
- You would need to use the desktop version of discord to manage webhooks.
- Go to Discord and sign in.
- Go to a server where you have MANAGE_WEBHOOKS permission, or create your own server.
- Create a channel > Go to channel settings > Webhooks and create a webhook.
- Name the webhook whatever you want and you can also optionally provide an image.
- Copy the webhook link and save it somewhere for later.
Note: You can replace the /api/webhooks/ with /api/v7/webhooks to get more descriptive errors while testing new features.
- Make sure that you're logged in to GitHub.
- Click on the fork button at the top right corner.
- You will see the forked version in your repositories section.
- Go to your profile > repositories section.
- You will see the forked version of the code.
- Open it and click on the download code button.
- Select your desired method to download it.
- Make a new
.env
file in the folder. - Configure it by following this example↗.
- Paste the links, passwords, and other configuration information which we have saved from previous steps.
- DO NOT commit this file to GitHub.
- DO NOT share this file with anyone else.
- Make sure your folder structure is similar to this repository.
- Open your terminal in the project folder. [For windows - Right click in explorer > open command prompt here].
- Use
npm i
to install all the dependencies for the project. - Start the site by using
npm start
. - Minimize the terminal and open your browser to localhost↗.
- If you followed the steps correctly, you should see the site homepage.
If you feel like you can change something to a better version, even if it is a comment to explain a function better, feel free to submit a pull request.
- Edit the code from the forked repository.
- Make a new branch with your code changes.
- Click on pull request button.
- Submit it!
Thank you for contributing. 💙
© 2020 Riday.