Skip to content

Latest commit

 

History

History
141 lines (100 loc) · 3.93 KB

CONTRIBUTING.md

File metadata and controls

141 lines (100 loc) · 3.93 KB

All information about contributing will be avaliable within the docs folder!

Getting Started

  1. Make sure npm is installed

    npm install -g npm

  2. Clone or Fork the Repository

  3. Make a Free Cloudinary Account and visit your dashboard. You should see 3 keys: You will need these later

  4. Also make sure docker is installed and docker desktop is avaliable

IF DOCKER DOES NOT WORK click here

Setting up Frontend

  1. Create a new .env file and copy the contents of .env.example

    On local branch:

    VITE_SERVER_URL=http://localhost:1337

    Docker exposes port 1337

    VITE_CLOUDINARY_CLOUD_NAME=

    Cloud Name is your Cloudinary Cloud Name

Setting up Server

  1. Create a new .env file and copy the contents of .env.example

    On local branch:

    ACCESS_TOKEN_SECRET
    REFRESH_TOKEN_SECRET
    EMAIL_USER
    EMAIL_PASSWORD
    EMAIL_DOMAIN
    GOOGLE_CLIENT_ID
    GOOGLE_CLIENT_SECRET
    

    doesnt matter you can leave them blank

    The following below needs to be setup:

    MONGO_URI=mongodb://admin:admin@lineupx_db:27017/LineupX
    PORT=1337
    CLOUDINARY_SECRET=[secret key]
    CLOUDINARY_CLOUD_NAME=[cloud name]
    CLOUDINARY_API_KEY=[api key]
    

    For the images to load you need to make the CLOUDINARY_CLOUD_NAME=ddwqqjmyo

Running application

  1. Make sure you're in the root directory of the project
  2. Run the following command:
    docker compose up
    
  3. Now the frontend, server, and database should be up and running!

Setting up the Database (if Valorant Data is Missing)

If the database for Valorant is not set up yet, follow these steps to initialize it using Docker.

Steps:

  1. Access the lineupx_db container:

    • Open Docker Desktop.
    • Navigate to the terminal of the lineupx_db container.

    Access Docker container terminal

  2. Navigate to the initialization folder:

    • In the terminal, run the following command:
      cd docker-entrypoint-initdb.d
  3. Run the initialization scripts:

    • Run the following commands in sequence to initialize the database:
      bash ./init-mongo.sh
      bash ./init-mongo2.sh

    Running the init scripts

<<<<<<< fix-docker

Troubleshooting Docker Issues

If Docker doesn't work as expected, follow these steps to run the project without Docker.

Alternative Setup (Without Docker)

Video Tutorial: https://www.youtube.com/watch?v=x5ob0yxvhas

  1. Install MongoDB Locally

  2. Run the Server and Frontend Manually

    • Backend:
      Navigate to the server directory and install the dependencies:

      cd src/api
      npm install
      npm start

      This will start the backend server.

    • Frontend:
      Navigate to the frontend directory and install the dependencies:

      cd src/web
      npm install
      npm run dev

      This will start the frontend in development mode.

By following this alternative setup, you can get the application up and running even if Docker is not available.

=======

main

Happy Developing!