Node.js/TypeScript starter kit optimized for seamless development and deployment, powered by Neon.tech
MIT License
A production-ready, class-based Node.js/TypeScript starter project with Flexible Framework and PostgreSQL as DB, designed for modular and scalable applications.
- Node.js (v16.x or higher)
- npm or yarn
- Docker (optional, for containerization)
Configuration: The application uses environment variables for configuration. Create a .env file at the root of the project and add the necessary variables from .env.template
for successful execution in dev/production env.
Steps to setup the code:
Clone the repository
git clone https://github.com/shravan20/neonode-quick-starter.git
cd neonode-quick-starter
Install dependencies
npm install
Running Locally
npm run dev
This will start the development server with hot-reloading.
Running in Production
npm run build && npm start
π src
β
βββ π api # Contains the main application logic (entities and modules)
β βββ π entities # Data models, types, and schemas (e.g., database entities, DTOs)
β β βββ user.entity.ts # Example: User entity schema
β β βββ base.entity.ts # Example: Base entity schema
β βββ π modules # Application modules, each encapsulated in its own directory
β βββ π health-check # Health check module
β β βββ health-check.controller.ts # Handles incoming requests and responses
β β βββ health-check.repository.ts # Data persistence logic
β β βββ health-check.router.ts # Routes definition for health check API
β β βββ health-check.service.ts # Business logic related to health checks
β βββ π user # User module (example)
β βββ user.controller.ts # Handles user-related requests
β βββ user.repository.ts # User data persistence
β βββ user.router.ts # Routes definition for user API
β βββ user.service.ts # Business logic for user operations
βββ app.ts # Application initialization and configuration
βββ π helpers # Utility functions and helpers
β βββ logger.ts # Custom logger setup (e.g., Pino or Winston)
βββ π middlewares # Custom middleware functions (e.g., authentication, error handling)
β βββ auth.middleware.ts # Example: Authentication middleware
βββ server.ts # Server startup and configuration (Express.js instance)
Contributions are always welcome and encouraged! While I strive to cover as many use cases as possible. If you come across any issues or something that doesn't make sense, feel free to open an issueβI'd be happy to discuss and improve things together.
For further details, refer to contributing.md