Skip to content

purvjoshi04/SharedInk

Repository files navigation

SharedInk

SharedInk is a canvas where users can draw shapes like squares, circles, arrows, and also use a freehand pencil tool.

Running Locally

Manual Setup

Note

This project uses pnpm as the only package manager.

  1. Clone the repository
git clone https://github.com/purvjoshi04/SharedInk.git
  1. Navigate to the project directory
cd SharedInk
  1. Create environment variables
cp .env.example .env
  1. Create web app environment file

Run following command in terminal:

touch SharedInk/apps/web/.env.local

Add 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
  1. Install dependencies
pnpm install
  1. 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
  1. Generate Prisma Client
pnpm run db:generate
  1. Run Database Migrations
pnpm run db:migrate
  1. Start the development server
pnpm dev

Visit the application at:

http://localhost:3000/

Instant Docker Setup

  1. Navigate to the project directory
cd SharedInk
  1. Create database environment variables

Create a .env file inside the packages/db folder:

DATABASE_URL="postgresql://postgres:postgres@postgres:5432/postgres"
  1. Create env file in apps/web folder

Run following command in terminal:

touch SharedInk/apps/web/.env.local

Add 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
  1. Start services using Docker Compose
docker compose up -d
  1. Visit the application
http://localhost:3000/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors