Live Demo - https://naya-sketch.up.railway.app/
- Setup Local Development
- API Documentation
- Socket.IO Events Documentation
- Front-End Docs
- References
- Video Demo
git clone https://github.com/ish-u/naya-sketch.git
cd naya-sketch
npm run init
-
Server
-
Create a
.env
file in theserver
folder -
Copy the variables from
.env.sample
to.env
and fill the required variables -
Setup MongoDB and obtain the Connection URI
- Get the
MONGO DB URI
using Atlas - Atlas UI - Set up docker and use the
docker-compse.yml
file provided indatabase
folder to run MongoDB in a docker container- Get the
MONGO DB URI
of the running docker container - Run
npm run db
innaya-sketch
to start the container - DB credentials can be found indatabase/docker-compose.yml
- Get the
- Get the URI from loacally installed MongoDB
- Get the
-
Generate
SESSION SECRET
using by runningrequire('crypto').randomBytes(64).toString('hex')
in node console -
Set
DB_NAME
tonaya-sketch
-
The Final
.env
will look like thisDEV=TRUE PORT=5000 SOCKET_PORT=8000 DB_URI="MONGO DB URI" DB_NAME="DB_NAME" SESSION_SECRET="SECRET" FRONTEND=http://localhost:5173
-
-
Client
-
Create a
.env
file inclient
folder and add the following to itVITE_APP_API=http://localhost:5000 VITE_APP_SOCKET=http://localhost:8000
-
-
Server
- Run the
npm run server
innaya-sketch
folder to start the development server - The Express Server will be Live at
http://localhost:5000
- The SocketIO Server will be live at
http://localhost:8000
- Run the
-
Client
- Run the
npm run client
innaya-sketch
folder to start the development server - The Client will be Live at
http://localhost:5713
- Run the
- /login
- /register
- /logout
- /user
- /sketch/get/:sketch-name
- /sktech/list
- /sketch/create/:sketch-name
- /sketch/update
- "send-point"
- "get-point"
- "join-room"
- "leave-room"
- "connect"
- "add-sketch"
- "new-sketch"
- "add-user"
- "remove-user"
- "update-user"
- "update-me"