Note
: This is the back end code of Subdot and the front end code can be found in this repository - https://github.com/its-me-sv/subdot-frontend
- User-to-user communication via chat [implemented]
- Advertisement posting dashboard with scheduling and filtering for adult content [implemented]
- Extra statistical information on the reputation page [implemented]
- Public sharing of posts [implemented]
- Rewarding top users with fund transfers based on RP score [pending implementation]
To verify that the code (for APAC Roadmap
) was written during the official hack period
(3 to 23 July 2023), kindly check the commit history here where there is no commit between July 5, 2023 (2 days after the APAC opening ceremony)
and March 17, 2023
. The same goes for the frontend code as well
Project link - https://subdot.netlify.app
Demo video (APAC edition) - https://youtu.be/xC0IGI8IIyI
Demo video (Europe edition) - https://youtu.be/JVkSsFW-gHE
- Update the
allowedOrigins
value in thesrc/utils/origins.js
- Check
MongoDB setup
andAstrDB (DBaaS for Cassandra)
to setup the databases (for storing stats, advertisements) - Chech
GCP Vision AI setup
andCloudinary setup
to setup image filtering and storing (for advertisements)
- This is used to check for nsfw content in user advertisement image
- Enable the
Vision AI
API in yourGoogle Cloud
account - Create
Credentials
and download the file to yourroot
directory - Rename the credentials file to
gcloud-creds.json
- This is used to store
advertisement images
- Create an account in
Cloudinary
from https://cloudinary.com/ and paste theAPI credentials
in your.env
file
- This is used for indexing ie. searching of users through
explore
field inSubdot
- Create a
MongoDB
database from https://www.mongodb.com/ with a collection namedSubdot
- Create
.env
file in the root directory with variableMONGO_URL
assigned to themongodb uri
which can be found in theConnect -> Connect your application
section of your mongo db database - Make sure to select the
Node.JS
driver with the version4.1 or later
- This is used for managing
advertisements
anduser reputation stats
- Create a
AstraDB
database from https://astra.datastax.com/ with a keyspace namedsubdot
- Use the
CQL Console
tab in the AstraDB database that you created to run theCQL queries
- Switch to
subdot
keyspace using the commanduse subdot;
- Run all the queries from the file
src/models/schema.cql
.
- Switch to
- Head to
Connect
tab in the AstraDB database that you created to connect from our backend- Choose
Drivers
underSelect a Method
- Select
Native
inType
underDrivers
and selectNode.js
- Download the
Secure Connect Bundle
(make sure to choose your region where your database resides) - Place the
Secure Connect Bundle
in the project's root directory (ie. in the same directory wherepackage.json
resides) - Generate
token
for the database (referGet an application token 🔑
fromQuick Start ⚡
section ) - Save the
token
and fill theASTRA_CLIENT_ID
,ASTRA_SECRET
secrets in the.env
file ASTRA_KEYSPACE
will be the name of the keypsace (subdot in our case)
- Choose
Note
: Your .env
file should look something like this. (kindly refer step 2 of Setup
to fill the secrets)
MONGO_URL =
ASTRA_CLIENT_ID =
ASTRA_SECRET =
ASTRA_KEYSPACE =
CLOUDINARY_CLOUD_NAME =
CLOUDINARY_API_KEY =
CLOUDINARY_API_SECRET =
CLOUDINARY_PRESET =
npm / yarn install
npm / yarn run dev (in development)
npm / yarn start (in production)