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 clientyarn installyarn 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)
- create a
.envfile in/serverand 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
cd serveryarn installyarn 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
