The client-side of the CodeSangam platform is built using React. To run the client locally, follow these steps:
-
Clone the repository:
git clone https://github.com/ContriHUB/CodeSangam.git
-
Navigate to the client folder:
cd client
-
Create a
.env
file for the client and add the following environment variables:REACT_APP_BASE_URL=<your_base_url> PORT=<your_port>
-
Install dependencies:
npm install
-
Start the client:
npm start
The client will now be running on
http://localhost:<PORT>/<REACT_APP_BASE_URL>
.
The server-side of CodeSangam is responsible for handling API requests, user authentication, and other backend functionality. To run the server locally, follow these steps:
-
Navigate to the server folder:
cd server
-
Create a
.env
file for the server with the following environment variables:PORT=<port_number> # OAuth CLIENT_ID=<your_client_id> CLIENT_SECRET=<your_client_secret> REDIRECT_URL=<your_redirect_url> # Configs BASE_URL=<base url> REGISTRATION_DEADLINE=<registration_deadline> DECLARE_RESULT=<result_declaration_date> # Secrets SESSION_SECRET=<your_session_secret> DB_URL=<your_database_url> CONTRI_DB_URL=<db connection url>
PORT
: The port number where the server will run.- OAuth variables (
CLIENT_ID
,CLIENT_SECRET
,REDIRECT_URL
): Used for authentication with OAuth. BASE_URL
: The base path for API routes.REGISTRATION_DEADLINE
andDECLARE_RESULT
: Dates for event registration deadline and result declaration.SESSION_SECRET
: Used for securing user sessions.DB_URL
: Database URL for the event.CONTRI_DB_URL
: Connection string for the internal database.
-
Install dependencies:
make
-
Run the server:
make run
The server will now be running on http://localhost:<PORT>/<BASE_URL>
.