Developing
- Postgres Setup - Setting up Postgres for local development
- Supabase Setup - Configuring a self-hosted Supabase instance for Domain Locker
- Querying the Database - How to pull data from the DB in the app
- Environmental Variables - Configuring the global environment
- Debugging Starter - Resolve issues in Domain Locker Self-Hosted
- Checking Logs - Start debugging an issue, or monitor the app with logs
- Components and Routes - Get started with new components, routes and services
- App Styling - Applying styles to app components
- API Endpoints - Running certain logic on the server-side
- Static Content - Adding documentation, articles or other static content
- Translations - Adding a language and internationalizationing component text
- Error Handler - Gracefully handle errors, log them, and show toasts to users
- Animating In - Subtle on-scroll animations for cards and components
- Docker Tips - Securing, monitoring, backing up and generally maintaining your container
- Feature Flagging - Enabling or disabling specific features on a per-user or environment basis
- Lazy Loading - Defer loading components until they become visible in the viewport
- Third-Party Docs - Documentation for the technologies and services used
- Toast Messages - Showing pop-up toast notifications to users
Development Setup
App Setup
Development Environment
git clone git@github.com:Lissy93/domain-locker.git
cd domain-locker
npm install
cp .env.example .env
npm run dev
Build for Production
To build for production, use npm run build
, then npm start
.
Or to build for a particular platform, use the build:vercel
, build:netlify
commands.
Database Setup
While running in dev, you will be automatically connected to our public development Supabase instance, so there is no need to setup or configure a database. (Note that the dev database is frequently wiped).
Alternatively, you can deploy your own database, either a (self-hosted or Pro) Supabase instance or a Postgres database.
Option 1) Postgres
With Postgres, follow the setup instructions in Postgres Setup,
then init the schema and start the DB with ./db/setup-postgres.sh
(to import the schema.sql
).
You'll then just need to pass the following env vars to the app, so it can connect to your Postgres instance.
DL_PG_HOST='localhost'
DL_PG_PORT='5432'
DL_PG_USER='postgres'
DL_PG_PASSWORD='supersecret'
DL_PG_NAME='domain_locker'
Option 2) Supabase
Deploy a new Supabase instance, apply the config from dl-sb-iac and set the following environmental variables:
SUPABASE_URL=xxx
SUPABASE_ANON_KEY=xx
Architecture


Self-Hosted Version
The self-hosted app is very simple, and consists of 3 containers:
- The app itself (client, server and optional webhooks for notifications)
- A Postgres database (to store your data)
- A cron service (optional, to keep domains up-to-date and trigger notifications)
Managed Version
This differs slightly from the managed instance, which has the same core web app, but is reliant upon some non-free services for extra features and security.
Why the difference? Running a SaaS app requires some additional components/layers in order to offer users the best possible experience. For example, the managed app also needs to cover the following areas:
- Multiple environments, automated CI/CD
- An ORM between client and server
- Feature flagging and role-based features
- Domain name, DNS, Captcha, WAF, cache, SSL
- Billing and user plan management
- Authentication, authorization and SSO
- STMP mailer service, and Twilio SMS
- Notification channels for WhatsApp, SMS, Signal, etc
- Backups for database, config, logs, assets
- Observability for bugs, payments, availability, traces
- User support for queries, billing, bugs, feedback, etc
Initializing
We're just getting everything ready for you. This shouldn't take a moment...