A full stack reddit clone built using the yarn workspace template. This repo contains a express backend and a next js frontend
View Demo
·
Report Bug
·
Request Feature
·
Blog
Codebase | Description |
---|---|
Akagi | Backend API |
Kaguya | Next js Client |
To get a local copy up and running follow these simple steps.
Make sure you have Docker and docker-compose installed on your machine.
-
Add environment file .env in akagi directory with the variables fiven in the .env.example file.
-
Run the following command in the project directory itself.
docker-compose -f docker-compose.debug.yml up --build
-
Open http://localhost:5000 to view it in the browser.
Make sure you have Node, Redis and TypeScript installed on your machine.
NOTE:
The project was made with node version 14.17.
-
Add environment files in backend directory.
akagi/.env
fileNODE_ENV=development MONGO_URI= DB_HOST= DB_PORT= DB_USERNAME= DB_PASSWORD= DB_DATABASE= REDIS_URI= LINKEDLIST_ACCESS_TOKEN_SECRET= LINKEDLIST_REFRESH_TOKEN_SECRET= LINKEDLIST_API_GOOGLE_CLIENT_ID= LINKEDLIST_API_GOOGLE_CLIENT_SECRET= LINKEDLIST_API_GOOGLE_CALLBACK_URL= LINKEDLIST_GITHUB_CLIENT_ID= LINKEDLIST_GITHUB_CLIENT_SECRET= LINKEDLIST_GITHUB_CALLBACK_URL= MAIL_USER= MAIL_PASSWORD=
-
To install all the dependencies run the following command in backend directory.
yarn
-
Run the following command in to buid the dist directory.
yarn build
-
Run the following command in to start server.
yarn dev
-
Your server should be running on port 5000.
-
Add environment files in frontend directory.
kaguya/.env
fileNODE_ENV = "development" NEXT_APP_PRODUCTION_API_ENDPOINT = "production_url" NEXT_APP_DEVELOPMENT_API_ENDPOINT = "http://localhost:5000"
-
To install all the dependencies run the following command in Frontend directory.
yarn install
-
Run the following command in the Frontend directory to start Svelte app.
yarn dev
-
Open http://localhost:3000 to view it in the browser.
This project is licensed under the MIT License - see the LICENSE.md file for details
Since this is an open source project all suggestions, requests and bug reports are always welcomed. If you have any don't forget to leave them in the issues section. But we recommend creating an issue or replying in a comment to let us know what you are working on first that way we don't overwrite each other.
Don't forget to checkout the CONTRIBUTING.md for more info on how to contribute to this project.
- staging -> pr this branch for everything
- prod -> don't even think of touching it, this is what's running in prod