SharedInk is a canvas where users can draw shapes like squares, circles, arrows, and also use a freehand pencil tool.
Note
This project uses pnpm as the only package manager.
- Clone the repository
git clone https://github.com/purvjoshi04/SharedInk.git- Navigate to the project directory
cd SharedInk- Create environment variables
cp .env.example .env- Create web app environment file
Run following command in terminal:
touch SharedInk/apps/web/.env.localAdd following env variables:
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
AUTH_SECRET=
NEXT_PUBLIC_BACKEND_URL=http://localhost:3001
NEXT_PUBLIC_WS_URL=ws://localhost:3002- Install dependencies
pnpm install- Database Setup
Create a .env file inside the packages/db folder:
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/postgres"Note
You must have a running PostgreSQL database. You can either:
- Use a hosted database like Neon.
- Or run PostgreSQL locally using Docker:
docker run -d \
--name postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=postgres \
-p 5432:5432 \
postgres:16- Generate Prisma Client
pnpm run db:generate- Run Database Migrations
pnpm run db:migrate- Start the development server
pnpm devVisit the application at:
http://localhost:3000/- Navigate to the project directory
cd SharedInk- Create database environment variables
Create a .env file inside the packages/db folder:
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/postgres"- Create env file in apps/web folder
Run following command in terminal:
touch SharedInk/apps/web/.env.localAdd following env variables:
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
AUTH_SECRET=
NEXT_PUBLIC_BACKEND_URL=http://localhost:3001
NEXT_PUBLIC_WS_URL=ws://localhost:3002- Start services using Docker Compose
docker compose up -d- Visit the application
http://localhost:3000/