A collaborative real-time drawing application built with SvelteKit and a separate TypeScript API server. This project prioritizes self-hostability & being private. It is recommended to use Tailscale, or some other wireguard setup to have users access the site on their devices, and not expose it to the internet..
I personally view this project as the perfect solution to a self-hosted notes/drawing crossover that is meant to be shared with your close friends & family. Even if it's just leaving each other notes, putting up reminders, etc.
- Node.js (v18 or higher)
- npm
- Install dependencies for both frontend and API:
npm icd api && npm install && cd ..npm i -g concurrently- .env
Configure .env.config as you'd like, then rename it to .env.
If you'd like to just quickly deploy the project and run in development mode (for testing, or most use-cases), simply renaming
.env.example-->.envwill suffice.
- Running
npm run dev- Use
Visit http://localhost:5173!
Refer to .env.example for an example. Simply change the name to .env and change and variables you'd like.
Ensure PUBLIC_PORT and PORT are the same if changed.
Need multiple origins for CORS? (Tailscale)
Modify your .env to include multiple origins, seperated by ,
CORS_ORIGIN=url1,url2,url3Start both API and frontend servers:
npm run devThis will start:
- API server on http://localhost:3001
- Frontend on http://localhost:5173
Or run them separately:
npm run dev:apinpm run dev:frontendnpm run buildnpm startThe frontend will start on :5024 for production builds. Please update your .env file if you plan on running the server in production mode.
Server logs are automatically saved to api.log in /api.
This project was created with assistance from AI. It was NOT the majority product of AI, and it was simply used as a tool
I feel the need to add this disclaimer because I believe AI use in projects, art, or any creative medium should be obviously labeled, allowing people to decide for themselves how they feel about it.
There will be a public demo available for this application, but it will not always be up due to server load & resource management. I host many things on my server, and this application is primarly meant to be self-hosted, and used among friends/family.
The config for this application is GLOBAL. This means that anyone with access to the application can change settings. If you do not want this behavior, please change DISABLE_GLOBAL_SETTINGS in your .env to true. Please note that if you choose to disable global settings, settings will be applied on a per-client basis which may lead to slightly conflicting experiences.
