-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 57ab4fe
Showing
63 changed files
with
877,648 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.idea/ | ||
.vscode/ | ||
node_modules/ | ||
build/ | ||
tmp/ | ||
temp/ | ||
.env | ||
redis/ | ||
documentation/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# RECIPE NUTRITION CALCULATOR API | ||
|
||
<p align="center"> | ||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a> | ||
</p> | ||
|
||
<p align="center">A progressive <a href="http://nodejs.org" target="blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p> | ||
|
||
## Description | ||
|
||
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. | ||
|
||
Final Project Assignment for Telerik Academy Aplpha with JavaScript - Design and implement single-page web application that will allow restaurant chefs to create and manage recipes composed of products with known nutrition values. During the interaction with the system users should see changes in nutrition information in real time. Newly created recipes could be tagged with a category from a list. | ||
|
||
|
||
### User Stories - Project Timeline | ||
|
||
- x Authenticate users - Register, Login, Logout | ||
- x Users can CRUD recipes | ||
- x Users can serach list of recipes by name or filter by category or by choosen nutrition value between given boundaries | ||
- x Users can serach for product and filter by product group | ||
|
||
|
||
### Stack | ||
|
||
- Database - MariaDB and Redis | ||
- REST API - NestJS | ||
|
||
---------- | ||
|
||
# Getting started | ||
|
||
## Installation | ||
|
||
Clone the repository | ||
|
||
git clone https://gitlab.com/recipe-nutrition-calculator/api.git | ||
|
||
Switch to the repo folder | ||
|
||
cd api | ||
|
||
Install dependencies | ||
|
||
npm install | ||
|
||
---------- | ||
|
||
## Database | ||
|
||
### MariaDB | ||
|
||
The example codebase uses [Typeorm](http://typeorm.io/) with a MariaDB database. | ||
|
||
Create a new MariaDB database with the name `recipes_db` (or the name you specified in the ormconfig.json) | ||
|
||
MariaDb database settings are in ormconfig.json | ||
|
||
Start local MariaDB server and create new database 'recipes_db' | ||
|
||
### Redis | ||
|
||
Start local Redis server | ||
|
||
---------- | ||
|
||
## NPM scripts | ||
|
||
- `npm start` - Start application | ||
- `npm run start:dev` - Start application in nodemon | ||
- `npm run typeorm` - run Typeorm commands | ||
- `npm run seed` - initial seed for the database | ||
- `npm run test` - run Jest test runner | ||
- `npm run compodoc` - run Compodoc to see full documentation of the app | ||
|
||
---------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"language": "ts", | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"watch": ["src"], | ||
"ext": "ts", | ||
"ignore": ["src/**/*.spec.ts"], | ||
"exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"watch": ["src"], | ||
"ext": "ts", | ||
"ignore": ["src/**/*.spec.ts"], | ||
"exec": "ts-node -r tsconfig-paths/register src/main.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"type": "mysql", | ||
"host": "localhost", | ||
"port": 3307, | ||
"username": "root", | ||
"password": "root", | ||
"database": "recipes_db", | ||
"synchronize": false, | ||
"logging": false, | ||
"entities": [ | ||
"./src/data/entities/**/*.ts" | ||
], | ||
"migrations": [ | ||
"./src/data/migration/**/*.ts" | ||
], | ||
"subscribers": [ | ||
"./src/common/subscribers/*.subscriber.ts" | ||
], | ||
"cli": { | ||
"entitiesDir": "./src/data/entities", | ||
"migrationsDir": "./src/data/migration" | ||
} | ||
} |
Oops, something went wrong.