- Overview
- Getting Started
- Database Setup
- Development
- Commands Reference
- Project Structure
- Contributing
- Legal Notice
- About Selleo
- Modern Tech Stack: Built with NestJS, Remix, and TypeScript
- Monorepo Structure: Well-organized codebase using Turborepo
- Development Ready: Complete development environment with Caddy for HTTPS
- Database Setup: PostgreSQL with migration and seeding support
- Email System: Built-in email templates and testing via Mailhog
- Testing: Comprehensive test suite for both frontend and backend
- API Documentation: Swagger integration with TypeScript client generation
- api: A NestJS backend application working as API
- web: A Vite Remix SPA
- reverse-proxy: For domains and https during development
- email-templates: A package for email templates
- eslint-config: A package for eslint configuration
- typescript-config: A package for typescript configuration
Before you begin, make sure you have:
- Node.js version 20.15.0 (stated in
.tool-versions
)- We recommend using asdf for version management
- pnpm package manager
- Caddy
- Docker and Docker Compose
Install project dependencies:
pnpm install
Configure Caddy (first-time setup only):
cd ./apps/reverse-proxy
caddy run
# After running caddy just terminate the process with Ctrl+C
Important
First run has to be run by hand to configure caddy. Later on it will automatically start with the app start script.
Configure environment variables for both applications:
cd apps/api
cp .env.example .env
cd apps/web
cp .env.example .env
- Start the database:
docker-compose up -d
- Run migrations:
pnpm db:migrate
Populate the database with initial data:
pnpm db:seed
To start all applications in development mode:
pnpm dev
After starting the development environment, you can access:
Service | URL | Description |
---|---|---|
Web App | https://app.lms.localhost | Frontend application |
API | https://app.lms.localhost/api | Backend API url |
Swagger | https://api.lms.localhost/api | API documentation |
Mailhog | https://mailbox.lms.localhost | Email testing interface |
- Format all files with Prettier
pnpm format
- Check if all files are formatted with Prettier
pnpm format:check
- Lint all files in the web app with ESLint
pnpm lint-tsc-web
- Lint all files in the api app with ESLint
pnpm lint-tsc-api
- Fix linting errors in the web app
pnpm lint-tsc-web --fix
- Fix linting errors in the api app
pnpm lint-tsc-api --fix
- Generate new migration:
pnpm db:generate
Important
After generating a migration:
- Change its name to something descriptive that explains what it does
- Make sure to update the migration name in
apps/api/src/storage/migrations/meta/_journal.json
under thetag
key
- Run migrations:
pnpm db:migrate
- Generate TypeScript API client based on Swagger specification:
pnpm generate:client
- Build email templates:
cd packages/email-templates pnpm build
Email templates are automatically built when starting the development server. To test emails, check the Mailhog interface at mailbox.lms.localhost.
-
Frontend tests:
pnpm test:web # Unit tests pnpm test:web:e2e # E2E tests
-
Backend tests:
pnpm test:api # Unit tests pnpm test:api:e2e # E2E tests
lms-core
├── apps
│ ├── api
│ │ ├── src
│ │ └── test
│ ├── reverse-proxy
│ └── web
│ ├── app
│ │ ├── api
│ │ ├── assets
│ │ ├── components
│ │ └── modules
│ └── e2e
└── packages
├── email-templates
├── eslint-config
└── typescript-config
We welcome contributions to LMS Core! Please check our Contributing Guide (coming soon) for guidelines about how to proceed.
This project was generated using Selleo LMS which is licensed under the MIT license.
Software development teams with an entrepreneurial sense of ownership at their core delivering great digital products and building culture people want to belong to. We are a community of engaged co-workers passionate about crafting impactful web solutions which transform the way our clients do business.
All names and logos for Selleo are trademark of Selleo Labs Sp. z o.o. (formerly Selleo Sp. z o.o. Sp.k.)