Currently taking a break from this project, will be back in November :)
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
Create an issue with a link to the repo you want me to add, and I might add it :)
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
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.
Frontend (React.js)
cd client
yarn install
yarn start
if you want to fetch the hosted api instead of localhostgo to client/.env
and change localhost to https://api.githubstonks.com/
Backend (Node, Express, MongoDB)
.env
file in /server
and put your mongoURI, github client id, github client secret, and github personal access token.when generating a personal access token from github you need to enable the public_repo scope
MONGO_URI=
CLIENT_ID=
CLIENT_SECRET=
PERSONAL_ACCESS_TOKEN=
cd server
yarn install
yarn start:dev
if you have any questions about running the code locally join our discord server !
api link: https://api.githubstonks.com/
METHOD | path |
---|---|
GET | /api/user/signin |
GET | /oauth-callback |
POST | /api/user/auth |
DELETE | /api/:id/delete-session |
METHOD | path |
---|---|
GET | /api/stonkData |
GET | /api/leaderboard |
GET | /api/:id/info |
METHOD | path |
---|---|
POST | /api/:id/buy |
POST | /api/:id/sell |
proper api doc coming soon