Code Monkey home page Code Monkey logo

reforum's Introduction

logo

ReForum

A minimal forum application built with the following technologies:

Application Features

  • Users can post a discussion
  • Users can reply their opinions regarding discussion
  • Users can favorite discussions
  • Users have their own profile page
  • Admin can create new forum categories
  • Admin have a lot of power over every users discussions and opinions :-p

Documentations

Home View

home view

Admin View

admin view

Deploy on you own server

Please make sure you have following software installed in your system:

  • Node.js > 6.0
  • NPM / Yarn
  • Git
  • MongoDB

First we need to clone the repository:

$ git clone https://github.com/shoumma/ReForum

Then we have to install the necessary dependencies using either NPM or Yarn:

$ npm i
$ yarn

Since the app currently uses GitHub authentication, we need to configure a GitHub OAuth application. You can register a new application from this link https://github.com/settings/developers

We need to grab the following information from the OAuth application.

  • Client ID
  • Client Secret
  • Callback URL

The Callback URL is the domain where GitHub will redirect the user after a successful login. You can use a domain name or local host. But we need to append the URL with the path /api/user/authViaGitHub/callback. So, the complete url will look like: https://localhost:8080/api/user/authViaGitHub/callback

Now, we need to configure the credentials inside of the codebase. Open the file config/credentials.js add the necessary information. The file looks like this:

module.exports = {
  GITHUB_CLIENT_ID: '',
  GITHUB_CLIENT_SECRET: '',
  GITHUB_CALLBACK_URL: '',
  DBURL: '',
};

We need to provide all the information here. You can notice that we need the database url here too. My local MongoDB url looks like:

mongodb://localhost:27017/reforum

Now we are ready to run the application. You can run either run the development environment of the application which will include Hot-Reload for JS codes using Webpack and the Redux dev tool extension, or you can run the production edition. The default port for developer edition is 8080, and for production is process.env.PORT.

To run the app in development environment:

$ npm run start:dev

To run the app in production environment:

$ npm run start

Now, if you visit http://localhost:8080 (if you ran the dev), or the production URL, you will see that the application is up and running. Congratulation! But, wait a minute, it's showing you Sorry, couldn't find the forum. That is because, we didn't create any forum yet. You can now sign up via github and then visit the admin panel with the url http://localhost:8080/admin. The application is currently configured in a way that, the first user will become the admin for the system.

Here we can create new forums and that forum will be displayed in the application. The first forum will be used as default forum.

Congratulation! You now have a clone of this application in your server. :-)

Path for Future Work

  • Add search functionality
  • Add unit tests for both backend and frontend
  • Ability to change the name and logo of the site from admin panel.
  • Make the installation process more interactive
  • Add multiple theme support.

License

MIT License. Do whatever you want to do. :-)

Conclusion

The application is created with lots of ♥. Any pull request, issues and contribution is very appreciated. It would be really great if we can take this application to the next level, where it can be used as a platform for forums.

Provash Shoumma

reforum's People

Contributors

proshoumma avatar ryleysill93 avatar tgdn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reforum's Issues

Discord OAuth Systems

hey there! sorry to bother you guys, but I wondered in there was any chance of implementing different OAuth systems, like discord. This makes sense as GitHub, while being an amazing place, is not used by the general public and is targeted directly towards devs! this is not an issue for most programs, as they are made for use by devs, but for something as broad as a forum, I think alternatives should be added! obviously, you can write your own, but this seems like a big area that may dissuade new users from using this program over others! thanks!

trying to deploy on heroku, but need some help

Hi Shouma,
i was tring to deploying it to heroku too but i found a problem even though it shows deployed succeed:
"An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details".( message on heroku)

everything working good on dev mode.

i also get it run on heroku bash, it shows same error as it was in logs:

Error: Cannot find module 'async/each'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (/app/server.js:6:14)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: better-npm-run start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /app/.npm/_logs/2017-12-25T21_09_40_574Z-debug.log

my repo is here:

https://github.com/gogogous88/reforum

please help thank you!

set up on local server fail

When I set up on my local server, after github OAuth, it shows the message:

This site can’t be reached
localhost unexpectedly closed the connection.
Try:

Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERR_CONNECTION_CLOSED

I don't know what configuration is missing.

I have set up my credentials.js like this
GITHUB_CLIENT_ID: '331c575bfb5220a7dee1',
GITHUB_CLIENT_SECRET: 'acc5fcc768b952382d60a27e830f1447b391ee2a',
GITHUB_CALLBACK_URL: 'https://localhost:3030/api/user/authViaGitHub/callback',

can you give me some hint what's going wrong.

Obsolete access method to Github

When logging in using Github OAuth2, Github alerted as below:

On February 6th, 2020 at 13:24 (UTC) your application (ReForum) used an access token (with the User-Agent passport-github) as part of a query parameter to access an endpoint through the GitHub API:

https://api.github.com/user/emails

Please use the Authorization HTTP header instead as using the `access_token` query parameter is deprecated.

Depending on your API usage, we'll be sending you this email reminder once every 3 days for each token and User-Agent used in API calls made on your behalf.
Just one URL that was accessed with a token and User-Agent combination will be listed in the email reminder, not all.

Visit https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters for more information.

[Bug] Incorrect discussions when the user is clicking on another thread in a discussion.

Hello there!

Terms:
Thread = a collection of discussions. Basically like the home view.
View = the page

Bug behavior:
When the user is in a discussion and want to change to another thread by an link in the header, the thread view will get all discussions from all threads.

Expected behavior:
When the user is in a discussion and want to change to another thread by an link in the header, the thread view will get all discussions from that specified thread.

What is causing this;
I have narrow the bug down to its component and its backend API calls, however I am completely newbie when it comes to react and couldn't fix the bug on my own after multiple long sessions of debugging. But I suspect forumfeed with its feedbox component with discussions prop is causing this issue, but I hope someone with more expertise could verify this and hopefully make an pull request to solve this issue.

Have a nice day/evening!

Add tests

Hi.

This is a cool project. Thanks for making it. I'm going through the code now and working on devising unit tests, as best I can. When I'm done, I'll send a pull request.

Thanks.

Server-side render for SEO

It would be great if the forum content was server-side rendered for better indexability by search engine spiders.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.