/Yume

Give wings to your dreams

Primary LanguageTypeScriptMIT LicenseMIT


Reddit clone✔️

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

Structure

Codebase Description
Akagi Backend API
Kaguya Next js Client

🏗️ Built With


🧩 Getting Started

To get a local copy up and running follow these simple steps.

Starting the development server with docker 🐳

Prerequisites

Make sure you have Docker and docker-compose installed on your machine.

Steps to start the server

  1. Add environment file .env in akagi directory with the variables fiven in the .env.example file.

  2. Run the following command in the project directory itself.

    docker-compose -f docker-compose.debug.yml up --build
  3. Open http://localhost:5000 to view it in the browser.

Starting the development server without docker 📡

Prerequisites

Make sure you have Node, Redis and TypeScript installed on your machine.

NOTE:

The project was made with node version 14.17.

Steps to start the server

  1. Add environment files in backend directory.

    akagi/.env file

    NODE_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=
  2. To install all the dependencies run the following command in backend directory.

    yarn 
  3. Run the following command in to buid the dist directory.

    yarn build
  4. Run the following command in to start server.

    yarn dev
  5. Your server should be running on port 5000.

Steps to start the client

  1. Add environment files in frontend directory. kaguya/.env file

    NODE_ENV = "development"
    NEXT_APP_PRODUCTION_API_ENDPOINT = "production_url"
    NEXT_APP_DEVELOPMENT_API_ENDPOINT = "http://localhost:5000"
  2. To install all the dependencies run the following command in Frontend directory.

    yarn install
  3. Run the following command in the Frontend directory to start Svelte app.

    yarn dev
  4. Open http://localhost:3000 to view it in the browser.

🔐 License

This project is licensed under the MIT License - see the LICENSE.md file for details

Suggestions and Bug Reports

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.

Branches

  • staging -> pr this branch for everything
  • prod -> don't even think of touching it, this is what's running in prod