![Logo](/stanleyclaudius/discussion-app/raw/main/client/images/logo.png)
An awesome discussion application based on website
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Discussion App is a web application that allows their user to post and reply a forum that create by other user. Beside create and reply. user also can upvote or downvote a post or reply. This application also came with authentication features, such as login, register, logout, and also forget password functioanlity.
Main technology used to built this application are listed below:
To get started with this project locally, follow below steps:
Make sure you have package manager (either npm or yarn), and also PostgreSQL on your machine.
FYI: This project uses yarn as package manager, but you're free to use npm too.
- Install Yarn (Only for user who want to use yarn)
npm i -g yarn
- Have PostgreSQL installed on your machine
- Have Redis installed on your machine, or use Redis Cloud credential
Below steps will guide you through the local installation process of this application
- Get your Google Client ID, Google Client Secret, and also GMail Refresh Token from here
- Get your Redis Cloud credential from here, if you don't have redis installed on your machine
- Clone the repo
git clone https://github.com/stanleyclaudius/discussion-app.git
- Install project dependency
Make sure that your terminal pointing at the root directory of this project (discussion-app folder). And you can open up 2 terminal to run below commands:cd server && yarn install
cd client && yarn install
- Complete the .env variable
Rename.env.example
file atserver
directory become.env
, then fill the value for every key. Below is the guideline for filling the .env value:
Key What To Fill Example Value PORT Your server port 5000 CLIENT_URL Your client side URL http://localhost:3000 DB_USER Your PostgreSQL username postgres DB_PASS Your PostgreSQL password root DB_NAME Your database name discussme GOOGLE_CLIENT_ID Your google client ID 3392348929324-tarur228dxxx GOOGLE_CLIENT_SECRET Your google client secret GOCSPX-xxxxxxx GMAIL_REFRESH_TOKEN Your gmail refresh token 1//028dhdjBMudu2829xxx MAIL_SENDER_ADDRESS Email that want to be used to send mail example@gmail.com COOKIE_NAME Your application cookie name qid SESSION_SECRET Your session secret key xy238djoIJAF_)0-_jdkfdh FORGET_PASSWORD_KEY_PREFIX Your prefix for forget password redis key discussme_forgetPassword_ REDIS_HOSTNAME Your redis hostname redis-19233.xxx REDIS_PORT Your redis port number 19233 REDIS_PASSWORD Your redis password eU82829djjfkxxx - Create a database with name corresponding to your
DB_NAME
value at .env file - Change directory to client folder, and change your
SERVER_URL
(e.g. http://localhost:5000) atconstant.js
file - Lastly, spin off the application by running 2 terminal at the same time, with commands such as bellow:
cd server && yarn dev-ts
cd client && yarn dev
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
LinkedIn: Stanley Claudius
Project Link: https://github.com/stanleyclaudius/discussion-app
Special thanks to:
- Othneildrew for providing an amazing README template.
- React Icons for providing icon to be used in this application.
- Chakra UI for providing styled React component to be used in this application.
- Heroku for providing backend hosting service for this application.
- Vercel for providing frontend hosting service for this application.
- Redis Labs for providing cloud Redis to be used in this application