JavaScript HTML CSS PLpgSQL Shell
Switch branches/tags
Nothing to show
Clone or download
akinsey Merge pull request #456 from epochtalk/websocket-connect
include websocket service in app.js
Latest commit 0fba8cb Jun 13, 2018
Permalink
Failed to load latest commit information.
cli read from config.emailerEnv in cli/index Feb 14, 2018
content Updated to remove flat file motd.txt Aug 8, 2017
defaults/legal Footer Copyright & Legal page Aug 13, 2016
modules include websocket service in app.js Jun 13, 2018
public Reset account works without captcha if not configured. Fixes #343 Sep 15, 2017
repl Removed couchDB, importer, setup cli, and logins Jun 28, 2014
scripts Remove unreferenced scripts Feb 7, 2018
server Add BadRequestError to errorMap May 19, 2018
test Add more test cases for color validator Jan 10, 2018
tests Seed moved to cli --create. Jun 1, 2015
websocket-server add redis password to websocket server config Jan 26, 2018
.dockerignore Removing references to old vars, misc fixes Nov 16, 2017
.gitignore Ignore protractor.env Jan 10, 2018
DOCKER.md add an extra space when starting a new sentence Aug 11, 2017
Dockerfile Remove references to bower Dec 16, 2017
README.md Update readme Feb 24, 2018
circle.yml Add chrome to start docker resources of circle Jan 11, 2018
circleci-docker-compose.yml add necessary websocket configs to circleci docker-compose Jan 27, 2018
config.js use accessKeyId and secretAccessKey for emailer config Jan 18, 2018
configurations.json Added default avatar for users throughout ui Jul 26, 2017
db.js Updated code to work with latest node-pg Oct 31, 2017
docker-compose.yml Fix dependencies Nov 14, 2017
example.env set BLUEBIRD_FORGOTTEN_RETURN in example.env Apr 30, 2018
example.protractor.env Move comments in example protractor env Jan 11, 2018
package.json update jquery in package.json Feb 21, 2018
protractor-docker-compose.yml Update circle configs to run protractor tests Jan 11, 2018
protractor.config.js Config protractor tests to use env vars Jan 10, 2018
redis.js Removed memdown added redis to take its place Jul 27, 2015
schema.sql Fix for missing report statuses Jun 23, 2017
setup.js Reset account works without captcha if not configured. Fixes #343 Sep 15, 2017
wait-for-it.sh Add docker compose for protractor tests Jan 10, 2018
websocket.js re-add websocket-secure for epochtalk frontend May 28, 2016
yarn.lock Yarn lockfile for jquery Feb 24, 2018

README.md

Epochtalk Circle CI Gitter chat

Warning this project is under active development, design is subject to change

Next generation forum software. Epochtalk is a forum frontend designed to be paired with the core-pg backend. Epochtalk forum software utilizes technologies such as AngularJS, Webpack, Postgres and Bourbon for improved performance and user experience as compared to existing forum software.

Epochtalk Forums

Index

Features

  • Epochtalk is a single page web application created with AngularJS
  • Web/Mobile ready responsive design using Bourbon
  • Code is bundled and loaded as needed, for performance, using Webpack
  • Designed with performance in mind. Epochtalk's backend, epochtalk-core-pg, utilizes Postgres as a database.
  • Customizable Theming (Branding, coloring, fonts, sizes)
  • Fully modular permissions system with roles

Dependencies

System

NPM

  • angular 1.4.4
  • angular-animate 1.4.4
  • angular-loading-bar 0.7.1
  • angular-resource 1.4.4
  • angular-sanitize 1.4.4
  • angular-sortable-view 0.0.13
  • angular-ui-router 0.2.15
  • aws-sdk ^2.7.22
  • bcrypt ^0.8.0
  • bluebird ^3.3.1
  • boom ^7.1.1
  • change-case ^2.3.1
  • cheerio ^0.20.0
  • commander ^2.9.0
  • deep-rename-keys ^0.1.0
  • del ^2.2.0
  • dot ^1.0.3
  • dotenv ^4.0.0
  • epochtalk-core-pg ^1.0.8
  • fs-extra ^4.0.2
  • good ^7.3.0
  • good-console ^6.4.0
  • good-file ^6.0.1
  • good-http ^6.1.3
  • good-squeeze ^5.0.2
  • handlebars ^4.0.11
  • hapi ^16.6.2
  • hoek ^5.0.2
  • html-loader ^0.5.1
  • inert ^4.2.1
  • ip-address ^5.0.2
  • joi ^13.0.1
  • jquery 3.0.0
  • json ^9.0.3
  • jsonwebtoken ^8.1.0
  • klaw ^2.1.1
  • lodash ^4.17.4
  • marked ^0.3.6
  • mkdirp ^0.5.1
  • mmmagic ^0.4.6
  • nestable slickage/Nestable
  • ng-tags-input 3.0.0
  • node-sass ^4.7.2
  • node-sass-globbing 0.0.23
  • nodemailer ^2.0.0
  • nodemailer-ses-transport ^1.5.1
  • oclazyload ^1.1.0
  • pg ^6.1.2
  • redis ^2.8.0
  • request ^2.83.0
  • rolling-rate-limiter ^0.1.10
  • sanitize-html ^1.4.3
  • socketcluster ^9.3.1
  • socketcluster-client ^9.0.2
  • stream-meter ^1.0.3
  • through2 ^2.0.0
  • uuid ^3.1.0
  • vision ^4.1.1
  • webpack ^1.12.2

Installation

1) Checkout repository using git:

$ git clone git@github.com:epochtalk/epochtalk.git

2) Change directories and install dependencies using yarn

$ cd epochtalk
$ yarn

5) Install module dependencies using yarn

$ cd modules
$ yarn

4) Copy the example.env file

This file specifies the server configurations and is necessary to run the server. You can edit the .env file later to specify the configurations as outlined in the Configuration section.

$ cd .. # cd back to project root
$ cp example.env .env

5) Initialize

First ensure that Postgres is installed andrunning. Before running Epochtalk for the first time, it is necessary to setup the database and first user account. The CLI tool will create the first board and admin account for the fourm. From the root directory of the project run the following command:

$ node cli --create

6) Start the Epochtalk server

Running the npm run serve command will start the Epochtalk webserver and compile all JavaScript and css. Once the server is running, the forum can be viewed at http://localhost:8080

$ npm run serve

7) Log in and change admin account information

Login to the admin account using the username admin and password admin1234. Visit your profile by clicking the link in the top right corner of the page, then change your username and password.

Trouble Shooting

Since both Epochtalk and core-pg are actively being developed, the database migrations can become out of sync. To resolve this you can checkout core-pg and then from within the root directory of core-pg, you can run npm link. Change directories into the node_modules of your checked out Epochtalk project and run npm link epochtalk-core-pg. This will ensure that Epochtalk is using the latest master of core-pg instead of the npm version. Then run npm run db-migrate from the root directory of your Epochtalk project to ensure all migrations are up to date.

Configuration

Forum configurations can be set either manually or using the admin panel.

Manual Configuration

The forum server configs can and must be set manually with a .env file in the root directory of the project.

DATABASE_URL="postgres://localhost/epochtalk_dev"
HOST="localhost"
PORT="8080"
PUBLIC_URL="http://localhost:8080"
REDIS_HOST="localhost"
REDIS_PORT="6379"
REDIS_AUTH_PASS=""

Admin Panel Configuration

Some configurations can also be set using the settings tab in the administration panel. Admin Settings

Saas mode

This can be set in the .env file by setting the var SAAS_MODE to true. What this basically does is the emailer and images config are hidden in the admin/settings/general view. These configs can only be edited through the .env file or directly in the database only and requires a restart for the changes to take effect.

API

The Epochtalk API can be accessed at http://localhost:8080/api/ while the server is running. To see full documentation for the api visit the Epochtalk API Documentation wiki page.

##Editor Editor

Each post is crafted through a unique editor with a live content preview.

BBCode

As for BBCode, the tags that are parsed are based off the SMF 1.0 BBCode spec but with some modifications as per the BitcoinTalk forum. Due to the fact that BBCode differs from forum to forum, a preview window is provided to the right of the main user input to preview what the post will look like once it has been sent to the server. The editor itself will parse the user input in real time with a 250 millisecond debounce. So user can continue to type and the text will not be parsed until 250 millisecond after the last keypress.

To view the list of supported BBCode tags click the Format button at the top right of the editor:

Formatting

Security

All user typed HTML is escaped using their decimal encoding while any other HTML is cleaned using punkave's sanitize-html library. All BBCode input is parsed through our modified BBCode-Parser library. This ensures that all content passed to the server is sanitized from any malicious code. Also, Angular's sanitization library also ensures that anything missed through the above process is yet again cleaned before it is shown on the client's browser.

All inputs on the forum are cleaned to different degrees.

Title like inputs are stripped of all html while description like inputs are allowed only formatting based html tags (<b>, <em>, <table> but not <div>, <img>, and <span>). Posts and Signatures are given the full treatment as described above but allow more html like <img>.

Anti-Abuse

Marked routes are protected from spam or abuse by tracking the number of times a user access an API endpoint. The first two uses of the endpoint are free of any penalties. Any use of the endpoint afterward is penalized with longer and longer cool down periods, starting from 1 minutes and ranging up to 65536 minutes or roughly 45 days from the last known incident. Proper use of the endpoint will trigger a function to remove all cool down periods. Improper use of the endpoint duing the cool down period will only increase the cool down period.

Planned Features:

  • Markdown Support
  • Medium Based Editor
  • Hiding the preview window
  • Moving the preview window to another location
  • Full feature compatibility across all input methods (BBCode, Medium, Markdown)

Contributions

Epochtalk is an open source project and gladly welcomes public contributions. Contributions can be made by creating a discussion via the issues. New features or fixes can be contributed via pull requests. Please note, all new packages must be added via yarn, not npm

Feedback

Please leave us feedback using github issues

License

The MIT License (MIT)

Copyright (c) 2016 Epochtalk

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.