Skip to content

sousaprogramador/firebase-node-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User Management Microservice with Firebase and Express

This project is a microservice for user management built with Firebase Realtime Database, Express, and TypeScript. It follows Domain-Driven Design (DDD) principles to ensure a clean architecture and maintainability.

Table of Contents

Features

  • Create, Read, Update, and Delete (CRUD) operations for users
  • Password encryption
  • Unique email validation
  • Error handling
  • Clean architecture with Domain-Driven Design (DDD)

Architecture

This project uses the hexagonal architecture (also known as ports and adapters) to decouple the business logic from external dependencies, such as Firebase and Express. The main layers are:

  • Domain: Contains the core business logic and domain models
  • Application: Contains use cases that orchestrate domain logic
  • Infrastructure: Contains external dependencies and implementations, such as Firebase services
  • Adapters: Contains adapters for external frameworks and libraries, such as Express controllers

Getting Started

Prerequisites

  • Node.js (>= 14.x)
  • Firebase CLI
  • TypeScript

Installation

  1. Clone the repository:

    git clone https://github.com/sousaprogramador/firebase-node-example.git
    cd your-repo
  2. Install dependencies:

    cd functions
    npm install
  3. Set up Firebase:

    firebase login
    firebase init functions

Compilation

Compile the TypeScript code:

npm run build
npm run serve

Technologies

  • Node.js
  • TypeScript
  • Express
  • Firebase Realtime Database
  • Firebase Functions
  • bcrypt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published