ngXpress: Full-Stack Angular 20+ Starter Kit with Server-Side Rendering (SSR), Express 5, Prisma ORM, Tailwind CSS 4, and Better Auth Integration
Created and maintained by @immohammadjaved
Think of ngXpress as bringing the best of the Next.js experience to Angularβwithout the bloat or learning curve. ngXpress is a modern, full-stack Angular 20 + Express 5 starter kit featuring out-of-the-box server-side rendering (SSR), zoneless execution, Prisma ORM, secure authentication with better-auth, and Tailwind CSS for responsive UIs. Build scalable, production-ready web applications with zero boilerplate and a feature-first, modular backend structureβperfect for both prototypes and production apps.
π Live Demo
Check out a live example of ngXpress in action:
β¨ Features & Tech Stack
- Angular 20+: Leverage the latest Angular with signals, standalone components, and new control flow for modern, reactive UIs
- Server-Side Rendering (SSR): Out-of-the-box SSR for SEO, performance, and fast initial loads
- Express 5 Backend: Modular, feature-first REST API architecture for rapid backend development
- Prisma ORM: Type-safe database access (SQLite by default, easily switchable to PostgreSQL, MySQL, etc.)
- Zoneless Execution: No zone.js overheadβenjoy maximum speed and simplicity
- Better Auth Integration: Secure, production-ready authentication out of the box
- Tailwind CSS 4: Build beautiful, responsive UIs with utility-first CSS
- TypeScript Everywhere: Strict typing for both frontend and backend
- NgOptimizedImage: Performant image handling for Angular apps
- Global Error Handling: Robust error management for APIs and UI
- Ready for Deployment: Optimized for Vercel, Netlify, and traditional servers
- Easy to Extend & Maintain: Clean, scalable codebase and feature-first folder structure
- Dev & Tooling: Angular CLI, ESLint & Prettier, Vite (optional), VS Code recommended settings, Node.js 20+
β‘ Quick Start Guide
Get started with your own ngXpress project in minutes:
-
Create Your Project from the Template
- Click the βUse this templateβ button on the ngXpress GitHub repository to generate a new repository under your GitHub account.
-
Clone Your New Repository
git clone https://github.com/<your-username>/<your-repo-name>.git cd <your-repo-name>
-
Install Dependencies
-
Set Up the Database (Prisma + SQLite by default)
npx prisma generate npx prisma db push
-
Start the Development Server (Angular + Express SSR)
-
Open Your Browser
- Visit http://localhost:4200
Additional Tips:
- To open Prisma Studio (DB GUI):
npx prisma studio - To build for production:
npm run build - To start the production server:
npm run start - Configure environment variables in the
.envfile as needed.
π¦ Whatβs Included
- Beautiful SaaS Landing Page: Modern, responsive, and ready to customize
- Authentication Screens: Sign In, Sign Up, Forgot/Reset Password (secure, production-ready)
- Admin Dashboard: Modular, extendable admin interface
- Todos CRUD Example: End-to-end CRUD with Angular, Express, and Prisma
π File Structure
A clear, modular structure for both frontend (Angular) and backend (Express):
src/
βββ app/
β βββ components/ # Standalone, reusable UI components
β βββ core/ # Core services, guards, and utilities
β βββ layouts/ # Application layouts (admin, auth, main)
β βββ models/ # TypeScript interfaces and models
β βββ pages/ # Route-based pages (admin, home, auth, not-found)
β βββ services/ # Feature and domain services
β βββ app.component.ts
β βββ app.routes.ts
β βββ ...
βββ api/
β βββ features/
β β βββ todos/
β β βββ todos.controller.ts
β β βββ todos.routes.ts
β βββ lib/
β β βββ prisma.ts
β β βββ auth.ts
β βββ middlewares/ # Express middlewares
β βββ utils/ # Utility functions
β βββ api.ts # Main API router
βββ generated/ # Prisma generated client
βββ main.ts # Angular entry point
βββ main.server.ts # Angular SSR entry point
βββ server.ts # Express server entry point
βββ styles.css # Global styles
- Separation of concerns: Frontend and backend code are clearly separated for maintainability.
- Feature-first: Both Angular and Express codebases are organized by feature for scalability.
- Ready for extension: Add new features by creating new folders in
src/app/pagesorsrc/api/features.
π Import Aliases
ngXpress uses TypeScript path aliases for clean, maintainable imports throughout your Angular app. This eliminates long relative paths and makes refactoring easier.
Why Use Import Aliases?
- Readability: Cleaner, more descriptive import statements
- Maintainability: Refactor and move files without breaking imports
- Scalability: Add new features and modules with less hassle
Usage Example
// β Without aliases (hard to maintain) import { TodoService } from '../../../services/todo.service'; import { AuthGuard } from '../../core/guards/auth.guard'; // β With aliases (recommended) import { TodoService } from '@services/todo.service'; import { AuthGuard } from '@core/guards/auth.guard';
Available Aliases
| Alias | Path | Description |
|---|---|---|
@components/* |
src/app/components/* |
Reusable UI components |
@core/* |
src/app/core/* |
Core services, guards, utilities |
@layouts/* |
src/app/layouts/* |
Application layouts |
@models/* |
src/app/models/* |
TypeScript interfaces and models |
@pages/* |
src/app/pages/* |
Route-based pages |
@services/* |
src/app/services/* |
Feature/domain services |
Aliases are configured in tsconfig.json and work seamlessly with Angular CLI and most editors (VS Code recommended).
Adding New Aliases
- Open
tsconfig.jsonin the project root. - Add your new alias under the
compilerOptions.pathssection. For example:"@utils/*": ["src/app/utils/*"]
- Restart your IDE for the changes to take effect.
For more details, see the TypeScript documentation on path mapping.
π Deployment
ngXpress is designed to be deployment-ready out of the box and can be deployed to any server that supports Angular 20+ SSR applications. You can deploy this app like a regular Node.js application - no need to run frontend and backend separately as it's a single, unified application.
Note: Work is in progress to add support for Vercel, Netlify, and Docker deployment. For now, traditional server deployment is recommended.
Traditional Server Deployment (Recommended)
For VPS, dedicated servers, or any Node.js hosting provider:
-
Build the Application
-
Start Production Server
-
Environment Setup
- Ensure Node.js 20+ is installed on your server
- Set production environment variables
- Use a process manager like PM2 for production
Environment Variables
Ensure these environment variables are set in production:
# Database DATABASE_URL="your_database_connection_string" # Authentication BETTER_AUTH_SECRET="your_secret_key" BETTER_AUTH_URL="https://yourdomain.com" # Optional: Customize ports PORT=4000
Database Considerations
- SQLite: Good for development and small applications
- PostgreSQL/MySQL: Recommended for production applications
- Database Migrations: Run
npx prisma migrate deployin production - Connection Pooling: Configure in your Prisma schema for production databases
Supported Hosting Providers
ngXpress works with any server that supports Angular 20+ SSR applications:
- VPS Providers: DigitalOcean, Linode, Vultr, AWS EC2, Google Cloud Compute
- Shared Hosting: Any provider with Node.js 20+ and Angular SSR support
- Traditional Hosting: Any server with Node.js 20+ support
- Cloud Platforms: AWS, Google Cloud, Azure (with proper Node.js setup)
Coming Soon: Vercel, Netlify, and Docker deployment support
π Documentation & Resources
- Angular Documentation: angular.dev
- Express.js Documentation: expressjs.com
- Prisma Documentation: prisma.io
- Tailwind CSS Documentation: tailwindcss.com
- Better Auth Documentation: better-auth.com
π€ Contributing
We welcome contributions to ngXpress! Please read our Contributing Guide for details on how to contribute.
π License
ngXpress is open-source software licensed under the MIT License. Feel free to use, modify, and distribute it as per the license terms.
π·οΈ Keywords
angular, angular-starter, angular-template, angular-fullstack, angular-universal, angular-ssr, angular-express, angular-prisma, angular-tailwind, angular-auth, fullstack, fullstack-starter, ssr, express, expressjs, prisma, tailwindcss, authentication, better-auth, typescript, nodejs, monorepo, modern-web, scalable, production-ready, nextjs-alternative, nextjs-for-angular, zoneless, angular-zoneless
π€ Creator
Made with β€οΈ by @immohammadjaved
Follow for updates, tips, and more Angular/NodeJs content!