-
Notifications
You must be signed in to change notification settings - Fork 27
Getting Started
Clone the SCE dev tool and follow the guide for setup: https://github.com/SCE-Development/SCE-CLI#setup
sce clone c
cd Clark
sce link c
- Install docker:
- run mongodb with:
sce run mongo
Ensure you have python3 installed and run the script with:
# if macOS or linux:
python3 setup.py
# if Windows:
python setup.py
skip the below sections, just do
sce run c
the frontend will be visible at both http://localhost and http://localhost:3000. the backend can be seen at http://localhost:8080
To simply run the application's frontend, paste the below command into your terminal.
npm run start
Shortly after, a window in your browser will open with the website on http://localhost:3000
.
In another new terminal window or tab, run the application with the command below:
npm run server
In yet another new terminal window or tab, run the application with the command below:
npm start
After some time, the application will load in the browser's terminal.
- In the topmost directory of
Core-v4
, run
npm run create-user
Follow the prompts and if the website is running from the steps above, you should be able to login with this created account.
Pre-requisite: you will need a Google Cloud Platform project setup to complete this section.
-
Before anything, you must have a GCP(Google Cloud Project) setup.
- Create a Google Cloud Account
- Start a new project
- Follow the prompts, make sure to select
External
in the Audience section to allow for testing - We can now create Clients in our app, navigate to
Clients
in the left side nav bar to create one - Add
https://developers.google.com/oauthplayground
the Authorized redirect URIs to allow OAuth 2.0 Playground to act as the client app and simulate the authorization flow. - We should now see the client appear under the
Clients
section
-
Select the client we created to obtain
Client ID
andClient Secret
. -
Create a new
config.json
file in the/api/config/
directory by simply making a copy of the existingconfig.example.json
and renaming copy toconfig.json
.- Ensure in the USER in
config.json
is the email you plan on using to send the verification email from.
- Ensure in the USER in
-
Open a terminal window and run:
npm run generate-token
The terminal will prompt for Client ID
, then the Client Secret
, copy the Client ID
and Client Secret
obtained earlier from Google Cloud.
- You should now see the third prompt, asking you to visit a link and get an
Authorization code
. Before you copy theAuthorization code
, ensure you have selected and authorized the APIs needed in Step 1.- In this example we are looking to send a verification email.
- We can use the search function to find mail related APIs

-
We can now give the
Authorization Code
to the prompt. -
A
token.json
file should be created under/api/config/
, you should see your authorization token being used there. In a terminal window use the command: (make sure you have 2 other terminal windows running the frontend and mongoDB, or one window running the full stack withsce run c
)

- If the command throws an error, you can simply change the `NODE_ENV` variables inside `docker-config.yml`
NODE_ENV=production npm run server
- Now test it by sending an email to yourself!
- Ensure your
config.json
'sgoogleApiKeys
section looks something like this
- Ensure your

- If you see an email in your inbox from yourself, it worked!.
- If you do not, ensure
config.json
hasUSER
set to the email you want to be sending the email from.
- If you do not, ensure
- Note: If you need to repeat this process, delete any existing token.js file.
Prerequisites: Find the AWS-IOT
folder in the shared google drive folder and download it.
- Drag and drop the
AWS-IOT
folder intoCore-v4/api/
- Run
npm start
,npm run server
andmongod
commands in separate terminals - Login into the website as an admin and go to RFID Manager
- Follow the instructions on how to setup ESP32
Post any relevant screenshots in #development in the SCE Slack and we'll sort it out.