diff --git a/README.md b/README.md index eeab218..0888afa 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ Provision the necessary AWS services needed for running the application: 1. From the root of the repo, navigate udagram-api folder `cd starter/udagram-api` to install the node_modules `npm install`. After installation is done start the api in dev mode with `npm run dev`. 1. Without closing the terminal in step 1, navigate to the udagram-frontend `cd starter/udagram-frontend` to intall the node_modules `npm install`. After installation is done start the api in dev mode with `npm run start`. +Note : For more details take a look at the docs folder + ## Testing This project contains two different test suite: unit tests and End-To-End tests(e2e). Follow these steps to run the tests. @@ -51,46 +53,18 @@ Unit tests are using the Jasmine Framework. The e2e tests are using Protractor and Jasmine. -### Architecture: - -![screenshot](doc/udagram.jpg) -![screenshot](doc/pipelineschema.jpg) - -# Screenshots: - -## RDS - -![screenshot](doc/rds.jpg) - -## Elastic Beanstalk - -![screenshot](doc/ebs.jpg) - -## S3 - -![screenshot](doc/s3Front.jpg) - -## Pipeline - -![screenshot](doc/env.jpg) -![screenshot](doc/pipeline.jpg) -![screenshot](doc/build.jpg) -![screenshot](doc/deploy.jpg) - ## Running App - [Access the application](http://udagram593666028033.s3-website-us-east-1.amazonaws.com/) ---- - -![screenshot](doc/app.jpg) - +![screenshot](docs/pictures/app.jpg) ## Built With - [Angular](https://angular.io/) - Single Page Application Framework - [Node](https://nodejs.org) - Javascript Runtime - [Express](https://expressjs.com/) - Javascript API Framework +- [Postgresql](https://www.postgresql.org/) - Postgresql Database # Author diff --git a/doc/pipelineschema.jpg b/doc/pipelineschema.jpg deleted file mode 100644 index 15861c5..0000000 Binary files a/doc/pipelineschema.jpg and /dev/null differ diff --git a/docs/app_dependencies.md b/docs/app_dependencies.md new file mode 100644 index 0000000..d7909ef --- /dev/null +++ b/docs/app_dependencies.md @@ -0,0 +1,88 @@ +# App Dependencies + +### udagram-front + +``` +"dependencies": { + "@angular/common": "^8.2.14", + "@angular/core": "^8.2.14", + "@angular/forms": "^8.2.14", + "@angular/http": "^7.2.16", + "@angular/platform-browser": "^8.2.14", + "@angular/platform-browser-dynamic": "^8.2.14", + "@angular/router": "^8.2.14", + "@ionic-native/core": "^5.0.0", + "@ionic-native/splash-screen": "^5.0.0", + "@ionic-native/status-bar": "^5.0.0", + "@ionic/angular": "^4.1.0", + "core-js": "^2.5.4", + "rxjs": "~6.5.4", + "zone.js": "~0.9.1" + }, + "devDependencies": { + "@angular-devkit/architect": "~0.12.3", + "@angular-devkit/build-angular": "^0.803.24", + "@angular-devkit/core": "~7.2.3", + "@angular-devkit/schematics": "~7.2.3", + "@angular/cli": "~8.3.25", + "@angular/compiler": "~8.2.14", + "@angular/compiler-cli": "~8.2.14", + "@angular/language-service": "~8.2.14", + "@ionic/angular-toolkit": "~1.4.0", + "@types/jasmine": "~2.8.8", + "@types/jasminewd2": "~2.0.3", + "@types/node": "~10.12.0", + "@typescript-eslint/eslint-plugin": "^2.20.0", + "@typescript-eslint/parser": "^2.20.0", + "codelyzer": "~4.5.0", + "jasmine-core": "~2.99.1", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~3.1.4", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "~2.0.1", + "karma-jasmine": "~1.1.2", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.4.0", + "ts-node": "~8.0.0", + "tslint": "~5.12.0", + "typescript": "^3.5.3" + } +``` + +### udagram-api + +``` + "dependencies": { + "@types/bcryptjs": "2.4.2", + "@types/jsonwebtoken": "^8.3.2", + "aws-sdk": "^2.429.0", + "bcryptjs": "2.4.3", + "body-parser": "^1.18.3", + "cors": "^2.8.5", + "dotenv": "^8.2.0", + "email-validator": "^2.0.4", + "express": "^4.16.4", + "jsonwebtoken": "^8.5.1", + "pg": "^8.7.1", + "reflect-metadata": "^0.1.13", + "sequelize": "^5.21.4", + "sequelize-typescript": "^0.6.9" + }, + "devDependencies": { + "@types/bluebird": "^3.5.26", + "@types/cors": "^2.8.6", + "@types/express": "^4.16.1", + "@types/node": "^11.11.6", + "@types/sequelize": "^4.27.44", + "@types/validator": "^10.9.0", + "@typescript-eslint/eslint-plugin": "^2.19.2", + "@typescript-eslint/parser": "^2.19.2", + "chai": "^4.2.0", + "chai-http": "^4.2.1", + "eslint": "^6.8.0", + "eslint-config-google": "^0.14.0", + "mocha": "^6.1.4", + "ts-node-dev": "^1.0.0-pre.32", + "typescript": "^3.9.10" + } +``` \ No newline at end of file diff --git a/docs/infrastructure_description.md b/docs/infrastructure_description.md new file mode 100644 index 0000000..98183ea --- /dev/null +++ b/docs/infrastructure_description.md @@ -0,0 +1,33 @@ +# Infrastructure Description + +The application have `udagram/udagram-front` for the frontend and `udagram/udagram-api` for the backend + +- The frontend is hosted on Amazon S3 +- The Backend is hosted on Amazon Elastic Beanstalk +- The postgres Database is hosted on Amazon RDS + +## Infrastructure Diagram + +![screenshot](pictures/udagram.jpg) + +## Screenshots + + +### RDS + +![screenshot](pictures/rds.jpg) + +### Elastic Beanstalk + +![screenshot](pictures/ebs.jpg) + +### S3 + +![screenshot](pictures/s3Front.jpg) + +### Pipeline + +![screenshot](pictures/env.jpg) +![screenshot](pipeline.jpg) +![screenshot](pictures/build.jpg) +![screenshot](pictures/deploy.jpg) \ No newline at end of file diff --git a/doc/app.jpg b/docs/pictures/app.jpg similarity index 100% rename from doc/app.jpg rename to docs/pictures/app.jpg diff --git a/doc/build.jpg b/docs/pictures/build.jpg similarity index 100% rename from doc/build.jpg rename to docs/pictures/build.jpg diff --git a/doc/deploy.jpg b/docs/pictures/deploy.jpg similarity index 100% rename from doc/deploy.jpg rename to docs/pictures/deploy.jpg diff --git a/doc/ebs.jpg b/docs/pictures/ebs.jpg similarity index 100% rename from doc/ebs.jpg rename to docs/pictures/ebs.jpg diff --git a/doc/env.jpg b/docs/pictures/env.jpg similarity index 100% rename from doc/env.jpg rename to docs/pictures/env.jpg diff --git a/doc/pipeline.jpg b/docs/pictures/pipeline.jpg similarity index 100% rename from doc/pipeline.jpg rename to docs/pictures/pipeline.jpg diff --git a/docs/pictures/pipelineschema.jpg b/docs/pictures/pipelineschema.jpg new file mode 100644 index 0000000..1789688 Binary files /dev/null and b/docs/pictures/pipelineschema.jpg differ diff --git a/doc/rds.jpg b/docs/pictures/rds.jpg similarity index 100% rename from doc/rds.jpg rename to docs/pictures/rds.jpg diff --git a/doc/s3Front.jpg b/docs/pictures/s3Front.jpg similarity index 100% rename from doc/s3Front.jpg rename to docs/pictures/s3Front.jpg diff --git a/doc/udagram.jpg b/docs/pictures/udagram.jpg similarity index 100% rename from doc/udagram.jpg rename to docs/pictures/udagram.jpg diff --git a/docs/pipeline_description.md b/docs/pipeline_description.md new file mode 100644 index 0000000..d80b613 --- /dev/null +++ b/docs/pipeline_description.md @@ -0,0 +1,32 @@ +# Pipeline + +The application use the integration of CircleCI with github, after each commit on the master branch, it will trigger CircleCI to deploy the application on AWS. + +## Steps + +![screenshot](pictures/pipelineschema.jpg) + +## CircleCI and AWS : + +### Build + +- Install Node/NPM +- Checkout the github repo code +- Install the dependencies for the Backend +- Build the Backend +- Install the dependencies for the Frontend +- Build the Frontend +- Lint FrontEnd + +### Hold + +- Need manual approval on CircleCI to trigger deployement + +### Deploy + +- Setup AWS CLI +- Setup AWS Access Key ID +- Setup Elastic Beanstalk CLI +- Deploy backend +- Deploy frontend +