A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
Notice: This project is designed to work with both the Web MVC model and the REST architecture. With many features needed for a #RealWorld project
⚠️ DISCLAIMER: This project is still in development and not stable yet. It's not recommended to use it in production.
Notes:
- Make sure you have Docker, Docker Compose and Node.js installed.
- The
run.sh
script only works on Linux or MacOS. On Windows, you have to run it in MINGW64 environment (aka. Git bash) - a PowerShell script will be available soon. See the instructions. - You need to install PostgreSQL and Redis by yourself, if you don't want to use Docker.
https://github.com/tranphuquy19/NestJS-EJS-MVC-boilerplate # Clone this repository
cd NestJS-EJS-MVC-boilerplate # Go to the root of the repository
yarn # Install dependencies
bash ./run.sh up -d # will start all services. `-d` will run the services for development mode.
yarn start:dev # Start the application in development mode
bash ./run.sh build # Build the application image for production
bash ./run.sh up -p # Start PostgreSQL, Redis, PgAdmin and the application in production mode
bash ./run.sh down # Stop PostgreSQL, Redis, PgAdmin and the application
bash ./run.sh down:volumes # Destroy PostgreSQL, Redis, PgAdmin and the application
I'm looking for help with fixing issues, adding new packages, docs and maintaining existing ones. It would be very helpful if you submit a pull request with bug fixes.
- production
- development
- EJS
- EJS Partials
- EJS Helpers
- Page render decorator page.decorator.ts
- RESTful API
- API versioning decorator api-v1.controller.ts
- API Pagination
- Multiple domains support
- API Response
- Static files
- Database queries
- CDN
- Cookies/Session
- Using Redis as Session Store
- Basic auth
- JWT auth
- Refresh token
- Web-socket auth
- OAuth Google
- OAuth Facebook
- OAuth Github
- Verify email
- Time-based One-time password (TOTP)
- Timeout
- Interval
- Cron job
- RESTful client
- GraphQL client
- SOAP client
- Nodemailer (smtp, password)
- Email templates
- PayPal
- Stripe
- Repository pattern
- Module path Aliases
- Role-based Access Control (RBAC)
- Attribute-based Access Control (ABAC)
- Can update grants at runtime
- Implemented builder pattern
- Sitemap generator
- Google Analytics
- Open graph
- Self-hosted push notification
- Store subscriptions in Redis
- Push notification to specific users
- Push notification to logged in users
- Push notification to guest users
- Unsubscribe notification
- Firebase Cloud Messaging
- Support EJS
<%= __('home') %>
, using i18n package - Using Cookie
- Uploader decorator uploader.decorator.ts
- Magic number checker
- Auto resize images
- Auto optimize images
- Auto generate video thumbnails
- Cloudinary
- AWS S3
- Log requests (using morgan)
- Log requests in
development
environment - Write logs to file in
production
environment
- Socket.IO
- Redis Pub/Sub
- VScode
- JetBrains's IDEs (WebStorm, IntelliJ IDEA, ...)
- Node Inspector
- Pagination
- Transaction
- Synchronizing Table Schemas
- Data seeding
- Multi-database
- Using helmet package
- CORS
- CRFS
- Schema validation (validation pipes)
- Rate limit
- Check uploaded file types with magic number
- Get stats
- Stats reports
- Email health check report
- Using husky
- Linting (with lint-staged)
- Prettier (just run
yarn format
) - Integrate Commitizen (use
yarn commit
instead ofgit commit
)
- Database backup
- Dockerfile (
development
,production
) - Docker-compose
- Improve image build process with buildkit
- Kubernetes
- Skaffold
- Github actions
- Circle CI
- Gitlab pipeline
- Multi-Stage pipelines
- Unit test
- E2E
- Coverage
- Performance
- Swagger docs
http://localhost:4000/docs
- Swagger json-docs (just append
-json
to Swagger path. Example:http://localhost:4000/docs-json
)