Giter Site home page Giter Site logo

sg_tech_api's Introduction

SG_TECH_API

A simple api for adding appointments at the SG Tech shop. Here is a README for the page structure and what I´ve learned with this project

Author: Joshua Hawatta

STACKS

Javascript Typescript node.js Express mongodb

LIBS

JWT Moment Multer Node mailer CORS bycrypt Express

WHAT I´VE LEARNED

- How to use *.d.ts files for custom types.
- create DTOs in a efficiently way.
- Single Responsibility Principle and Dependency Inversion Principle from SOLID.
- building from scratch a whole MongoDB and TypeScript API using a hybrid of MVC and Pack By Feature architecture.

AT ROOT DIRECTORY

node_modules

where all of my dependencies are. Probably you don´t have it if you cloned this repo. just run "npm install" and it´s done! :)

src

the main directory for all the application files and sub-directories.

OTHER FILES OF ROOT DIRECTORY

.env.example: enviroment vars stay here. create a ".env" file and replace all examples with your own data.
.eslintrc.json: project linting configuration.
.gitignore: all files and directories the git must ignore.
package*.json: my package managers.
README.md: documentation.
tsconfig.json: typescript configuration file.

INSIDE src DIRECTORY

config: where the application, mailing and multer configurations are.
database: database connection.
DTOs: where it has other 2 sub-directories for my DTOs files (User and Appointments).
entities: same 2 sub-directories of DTOs. Here is where the controllers, routing and DB schemas are. There´s also a DiskStorage entity for handling uploads.
helpers: JWT and Mailing handlers, and date-handling functions.
interfaces: the interfaces of my entities.
middlewares: my requests validations directory, a validation results getter and a JWT verifyer.
types: custom types in here.
uploads: where all uploaded images stay.
server.ts: main file for running the application.

sg_tech_api's People

Contributors

joshuahawatta avatar

Stargazers

Roman avatar Lucas Nascimento avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.