@ondrejrohon/shared-server
v0.0.14
Published
Shared server-side utilities and scripts for all apps in the monorepo.
Readme
Shared Server Package
Shared server-side utilities and scripts for all apps in the monorepo.
Features
- Authentication - Lucia Auth with email/password and OAuth providers
- Database - Drizzle ORM utilities and migrations
- Email - MailerSend integration for transactional emails
- File Uploads - R2 storage with presigned URLs
- Backups - Automated database backups with GFS retention → BACKUPS.md
- Scaffolding - Code generation for CRUD views
- Testing - Vitest utilities for server-side tests
Documentation
- BACKUPS.md - Database backup system (automated, GFS retention, R2 storage)
- UPLOADS.md - File upload system with R2
- PUBLIC_UPLOADS.md - Public bucket uploads (opt-in, for migrated/public content images)
Usage
This package is used as a workspace dependency:
{
"dependencies": {
"shared-server": "workspace:*"
}
}Import utilities in your app:
import { createAuthService } from 'shared-server';
import { createEmailService } from 'shared-server';Lucia Auth
https://lucia-auth.com/
https://github.com/lucia-auth/example-sveltekit-email-password-2fa/tree/main
all lucia auth files are based on commit: https://github.com/lucia-auth/example-sveltekit-email-password-2fa/tree/7f9f22d48fb058e4085a11c52528e781c4bc70df