Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shravan20/neonode-oss-quick-starter
Node.js/TypeScript starter kit optimized for seamless development and deployment, powered by Neon.tech
https://github.com/shravan20/neonode-oss-quick-starter
database deno javascript nodejs postgres postgresql serverless typescript
Last synced: 4 months ago
JSON representation
Node.js/TypeScript starter kit optimized for seamless development and deployment, powered by Neon.tech
- Host: GitHub
- URL: https://github.com/shravan20/neonode-oss-quick-starter
- Owner: shravan20
- License: mit
- Created: 2024-08-23T21:03:55.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-24T12:48:42.000Z (5 months ago)
- Last Synced: 2024-09-30T18:40:56.407Z (5 months ago)
- Topics: database, deno, javascript, nodejs, postgres, postgresql, serverless, typescript
- Language: TypeScript
- Homepage:
- Size: 233 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: LICENSE
- Code of conduct: code_of_conduct.md
- Security: security.md
Awesome Lists containing this project
README
![]()
Neonode Quick Starter
A production-ready, class-based Node.js/TypeScript starter project with Flexible Framework and PostgreSQL as DB, designed for modular and scalable applications.
[![Build Status](https://img.shields.io/github/actions/workflow/status/shravan20/neonode-quick-starter/ci.yml)](https://github.com/shravan20/neonode-quick-starter/actions)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)## Table of Contents
- [x] [**Features**](#features)
- [x] [**Getting Started**](#getting-started)
- Prerequisites
- Installation
- Configuration (Environment Variables)
- [x] [**Project Structure**](#project-structure)
- [ ] [**Usage**]()
- Health Check Endpoint
- Logging
- [ ] **Deployment**
- [x] [**Contributing**](#contributing)### Features
- [x] **TypeScript**: Fully typed for stronger code reliability.
- [x] **Class-based Architecture**: Organized using classes for controllers, routers, and services.
- [x] **Middleware**: Pre-configured for JSON parsing, URL encoding, etc.
- [x] **Environment Config**: Use DotEnv for storing custom configurations in process.env.
- [ ] **API Documentation**: Integrates with Swagger or similar tools for auto-generated docs.
- [ ] **API Versioning**: Supports versioning for backward compatibility.
- [ ] **Caching**: Implements caching with Valkey/KeyDB support.
- [ ] **Routing**: Separates Web Routes and API Routes for better organization.
- [ ] **Authentication Middleware**: Uses CSRF Tokens for Web routes, JWT for API routes.
- [ ] **Testing**: Comprehensive unit and integration testing with Jest/Mocha.
- [ ] **Database Migration**: Supports tools like Knex or Sequelize for schema management.
- [ ] **Health Monitoring**: Easy integration with tools like Prometheus/Datadog.
- [ ] **Background Queues**: Implements background job processing.
- [x] **Logging Interceptor**: Uses Winston for enhanced log management.
- [ ] **PostgreSQL Queries**: Supports atomic PostgreSQL queries on demand.
- [ ] **Connection Pools**: Customizable backend storage connection pools.
- [ ] **Rate Limiting**: Limits requests per user to prevent abuse.
- [ ] **Global Handlers**: Centralized response and error handling.
- [x] **Graceful Shutdown**: Ensures smooth server shutdown.
- [ ] **Multi-language Support**: Adds i18n for multiple languages.
- [ ] **Task Scheduler**: Supports scheduled tasks with node-cron.
- [ ] **Documentation**:
- [x] README.md
- [x] License.md
- [x] Code of Conduct.md
- [x] Contributing.md
- [ ] Architecture.md
- [x] Security.md
- [ ] Deployment.md
- [ ] Configuration.md
- [ ] Roadmap.md
- [ ] Support.md
- [ ] API_docs.md
- [ ] FAQ.md
- [ ] Acknowledgements.md
- [ ] Changelog.md### Getting Started
#### Prerequisites
- Node.js (v16.x or higher)
- npm or yarn
- Docker (optional, for containerization)#### Installation
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:
1. Clone the repository
```sh
git clone https://github.com/shravan20/neonode-quick-starter.git
cd neonode-quick-starter
```2. Install dependencies
```sh
npm install
```3. Running Locally
```sh
npm run dev
```This will start the development server with hot-reloading.
4. Running in Production
```sh
npm run build && npm start
```### Project Structure
```sh
π 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)```
### Contributing
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](./contributing.md)