Skip to content

rd-code-23/githubstonks

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

227 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHubStonks

What is githubstonks ?

githubstonks.com

Githubstonks is a stock market game where the stocks are popular GitHub repositories. You can buy and sell repo's like React, Node, and more.


NOTE_0: GITHUBSTONKS is still under development which means user data and stonk data will be reset many times, if you encounter a bug or have a suggestion/question please submit an issue or join our discord server


"You should add this repo to the game"

Create an issue with a link to the repo you want me to add, and I might add it :)

How are the share prices calculated ?

intial price = stars * 0.0003 + forks * 0.0002 + commits * 0.0001

The price of the stonks go up and down based on the total shares bought of that stonk.

marketprice = total shares bought * 0.00001

final price = initial price + market price


Contributions

GitHubStonks is open to contributions, but I recommend creating an issue first to let me know what you are working on that way we don't overwrite each other.

How to run locally (dev environment)

Frontend (React.js)

  1. cd client
  2. yarn install
  3. yarn start

if you want to fetch the hosted api instead of localhost go to client/.env and change localhost to https://api.githubstonks.com/

Backend (Node, Express, MongoDB)

  1. create a .env file in /server and put your mongoURI, github client id, and github client secret
MONGO_URI=put your mongo uri here
CLIENT_ID=put your github oauth client id here
CLIENT_SECRET=put your github oauth client secret here
  1. cd server
  2. yarn install
  3. yarn start:dev

if you have any questions about running the code locally join our discord server !

Api doc

api link: https://api.githubstonks.com/

login/auth

METHOD path
GET /api/user/signin
GET /oauth-callback
POST /api/user/auth
DELETE /api/:id/delete-session

data

METHOD path
GET /api/stonkData
GET /api/leaderboard
GET /api/:id/info

buy/sell

METHOD path
POST /api/:id/buy
POST /api/:id/sell

proper api doc coming soon

About

πŸš€ πŸ“ˆ Stock market game where the stocks are github repositories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 96.9%
  • HTML 2.5%
  • Other 0.6%