Deno_rest

screenshot of Deno_rest

A Boilerplate for deno RESTful apis

Overview

Deno REST is a boilerplate project for creating RESTful APIs using Deno, Oak, and deno_mongo. Deno is a secure runtime for JavaScript and TypeScript, Oak is a middleware framework for Deno's http server, and deno_mongo is a MongoDB driver for Deno. This project follows a clean architecture, separating concerns into different layers for easy maintenance and scalability. It also includes features such as MongoDB integration, JWT-based authentication, user authorization with role-based access control, CORS support, environment management via .env file, request validation, error handling, database seeding, user roles and permissions management, user activity history tracking, password hashing with BCrypt, Denon integration, integration tests, and Docker and CircleCI integration.

Features

  • Organized by Model, Controller, Service structure: Follows a clean architecture that separates concerns into different layers.
  • MongoDB integration: Utilizes the deno_mongo library for seamless interaction with MongoDB databases.
  • JWT-based authentication: Securely authenticate users with JSON Web Tokens (JWTs).
  • User authorization: Implements role-based access control to restrict resources based on user roles.
  • CORS support: CORS middleware is integrated to handle cross-origin requests.
  • Environment management via .env: Manage different environments with ease using the .env file.
  • Request validation: Validates incoming requests to ensure they contain valid data.
  • Error handling: Gracefully handles errors and provides helpful error messages to the client.
  • Database seeding: Populates the database with initial data using the database seeding feature.
  • User roles and permissions: Efficiently manage user access and permissions.
  • User activity history: Keeps track of user activities within the application.
  • Password hashing with BCrypt: Securely stores user passwords with BCrypt hashing.
  • Denon Integration: Uses Denon, a utility like nodemon for Deno, to automatically restart the server on file changes.
  • Integration tests: Test the application with pre-written integration tests.
  • Docker and CircleCI integration: Containerize the application with Docker and set up continuous integration with CircleCI.

Summary

Deno REST is a boilerplate project that simplifies the process of creating RESTful APIs using Deno, Oak, and deno_mongo. It provides a clean architecture, MongoDB integration, JWT-based authentication, user authorization, CORS support, environment management via .env file, request validation, error handling, database seeding, user roles and permissions management, user activity history tracking, password hashing with BCrypt, Denon integration, integration tests, and Docker and CircleCI integration. This project aims to make API development with Deno more efficient and secure.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.