From 2320d9993572669fea55fc2afde81b2ec6594c27 Mon Sep 17 00:00:00 2001 From: Julian Fischetti Date: Thu, 26 Nov 2020 01:08:59 -0300 Subject: [PATCH] :books: new documentation --- README.md | 7 +++++++ docs/API-Changelog.md | 11 +++++++++++ docs/Technologies.md | 22 ++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 docs/API-Changelog.md create mode 100644 docs/Technologies.md diff --git a/README.md b/README.md index 2a1a482..fc9cd66 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ cd pixowlgram docker-compose up ``` +_configure .env or keep docker-compose default values to easy startup_ + ## Install & Run ### Download @@ -47,6 +49,11 @@ npx sequelize db:migrate npm run start ``` +## Docs + +- [API Changelog](docs/API-Changelog.md) +- [Technologies](docs/Technologies.md) + ### TODO - Token expires diff --git a/docs/API-Changelog.md b/docs/API-Changelog.md new file mode 100644 index 0000000..82a9130 --- /dev/null +++ b/docs/API-Changelog.md @@ -0,0 +1,11 @@ +# API Changelog + +## 2020-11-25 » v1.0.0 + +| Method | Path | Token | Descripción | +| ------ | ---------- | ----- | -------------------- | +| `POST` | `/posts` | ✔️ | Create new post | +| `GET` | `/posts` | ✔️ | Get posts | +| `POST` | `/users` | ❌️ | Register new user | +| `POST` | `/session` | ❌️ | Crete new user token | +| `POST` | `/upload` | ✔️ | Upload image | diff --git a/docs/Technologies.md b/docs/Technologies.md new file mode 100644 index 0000000..fcbce5e --- /dev/null +++ b/docs/Technologies.md @@ -0,0 +1,22 @@ +# Technologies + +## Node dependencies + +- bcrypt: For encipt and compare user password. +- cors: Enable cors for browsers (configured for any domain) +- dotenv: Manage many .env files. +- express: Web server. +- express-paginate: Parse query parameters to paginate responses. +- express-routes: Print routes un development mode. +- express-validator: Requests validations middelware. +- http-status-codes: Constants enumerating the HTTP status codes. +- jsonwebtoken: Sign and verify tokens. +- morgan: Logger. +- multer: Used for upload images. +- sequelize: SQL ORM (postgres in production, sqlite in dev and memory for tests) + +## Database + +For this MVP use SQL databases. +Choosed SQL for my knowledge with this paradigm and my experience using sequelize (SQL ORM). +I would have preferred to use MongoDB (or some other document database) to exploit horizontal scale and faster access times.Don't use mongo because of the times I had available to perform the MVP