GithubHelp home page GithubHelp logo

anemy / gamexfer Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 1.29 MB

Trade pixels with other internet people.

Home Page: https://gamexfer.com

License: MIT License

JavaScript 76.42% HTML 4.99% CSS 18.59%

gamexfer's Introduction

GameXfer

Gamexfer.com

See LICENSE.txt for the license.

Installation

Install node js from https://nodejs.org/en/download/

Install mongodb from https://docs.mongodb.com/getting-started/shell/installation/

We use dotenv for storing environment variables around confidential/secret tokens. Message Rhys for for that file.

$ npm install
$ npm install -g gulp
$ npm install -g eslint
$ npm install -g babel-cli # For one off scripts. # Might be optional - I need to test.
$ npm install -g nodemon

Deployment

Development

$ mongod # Ensure mongodb is running on the system. Look below if you need to create collections.
$        # Mongo looks for the database `gamexfer_test` on development.
$        # I'll write a script soon, for now just ask me how to do this.
$ npm run start-dev
$ browser https://localhost:3000

Database Schemas

Users

  • user
    • username String - Unique, lower case.
    • displayUsername String - Username with upper case available.
    • avatarURL String - S3 CDN url.
    • biography String - Stored as HTML, edited as markdown.
    • password String - Hashed via bcrypt
    • xferCoin Number
    • createdAt Date
    • posts: Number
    • threads: Number
    • mostRecentCommentTime Date
    • mostRecentCommentId String
    • mostRecentCommentThreadId String
    • mostRecentCommentForumId String
    • messagesRecievedTotal Number
    • messagesLength Number - The amount of messages in the user's inbox. Saves counting operation time. Counted via the messages collection.
    • deletedMessages - Array of messages ^ - Stores last 5 deleted messages in a queue.
    • timesShownTrackingLimitWarning Number - We warn a user when they're tracking the max amount of threads. This makes them warn a limited amount.
    • trackedThreads Array - An array of the thread ids the user has tracked. Can hold up to 50 tracks at a time.
      • threadId String - Unique in combination with forumId.
      • forumId String - Unique in combination with threadId.
      • uniqueThreadId String - The thread's individual id not related to forumId.
      • trackedAt Date

Forums - The info about certain forums is contained in src/shared/Forums.js

  • forum
    • forumId String
    • threadsCreatedTotal Number
    • mostRecentThreadId String - The id of the most recently created thread. Not necessarily the most recently commented.
    • mostRecentThreadTime Date
    • mostRecentThreadAuthor String
    • mostRecentCommentId String
    • mostRecentCommentTime Date
    • mostRecentCommentAuthor String
    • mostRecentCommentThreadId String

Threads

  • thread
    • threadId String - Unique in combination with forumId. It's the count of the actual forum in that thread.
    • forumId String - Unique in combination with threadId.
    • title String
    • description String
    • views Number
    • author String - The username of the creator of the thread.
    • type String The type of thread. The types are defined in the shared constants.
    • mostRecentCommentTime Date
    • mostRecentCommentAuthor String
    • commentsLength String
    • comments Array
    • commentId Number - Incremented by each new comment.
    • author String
    • text String - HTML string. Built via quill.
    • createdAt Date

Messages

  • messages
    • messageId String - Uuid timestamped.
    • sender String - The username of the user who sent the message.
    • destination String - The username of the user who recieved the message.
    • subject String
    • text String - HTML string. Built via quill.
    • sentAt Date
    • deletedAt Date - When the message was deleted. There is a max amount of these per destination
    • readAt Date - When the message was read. (If the message is unread this is unset.)

Transactions

  • transaction
    • destination String - Username.
    • sender String - Username.
    • message String
    • status String - The status of the transaction - 'initiated', 'sent', or 'recieved'.
    • amount Number - The number of xferCoin sent.
    • createdAt Date
    • sentAt Date
    • completedAt Date

gamexfer's People

Watchers

 avatar  avatar  avatar  avatar

gamexfer's Issues

DB issue on first build --- No initial data directory

I know we talked about this last night, but copying the error here just in case. Happens when trying to run mongod after installing modules.

2017-08-09T11:11:33.000-0400 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2017-08-09T11:11:33.000-0400 I CONTROL  [initandlisten] dbexit:  rc: 100

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.