Welcome to Gurukul, a product of Avanti.
To run the development server, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/avantifellows/gurukul
-
Navigate to the project directory:
cd path-to-gurukul-app
-
Install the project dependencies:
npm install
-
Start the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
-
Navigate to the portal-backend directory:
cd path-to-portal-backend-app
-
Start the application server by running:
cd app; uvicorn main:app --reload
-
Add gurukul origin to the CORS allowed origins array in
main.py
:origins = ["http://localhost:3000"]
-
Portal frontend will be responsible for setting up the token in browser cookies. For setting token manually:
i: Create an access token first through portal backend using
http://localhost:8000/docs#/Authentication/create_access_token_auth_create_access_token_post
. You can adjust thetype
in body to beorganization
.ii: Once the access token is generated, you need to set it in the browser cookies [Note: Since cookies are subject to the same-origin policy so try to set in the
localhost:3000
only, otherwise you need to make changes in the portal-frontend such that they could share their resource with other domains if token generation is done from frontend]iii: On refreshing the page, it would show
Welcome to gurukul
if the token is correct else it would showUser not logged in