Skip to content

Commit

Permalink
Merge pull request #41 from COS301-SE-2023/setup-readme
Browse files Browse the repository at this point in the history
Setup Readme
  • Loading branch information
PaulPilane authored May 23, 2023
2 parents 5b19a8e + 6b37d19 commit e1389ed
Show file tree
Hide file tree
Showing 37 changed files with 675 additions and 364 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/cd-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Development CI/CD

on:
push:
branches: [ dev ]

permissions:
contents: read

jobs:
ci-workflow:
uses: ./.github/workflows/ci-dev.yml
secrets: inherit

deploy-app:

name: App Deployment
needs: ci-workflow
runs-on: ubuntu-latest
environment: Development

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: af-south-1

- name: Setup NodeJS and Cache
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Install Dependencies
run: npm install

- name: Build App
run: npm run build:app:dev

- name: Deploy App
run: aws s3 sync ./dist/apps/app s3://dev-fridgetoplate
47 changes: 47 additions & 0 deletions .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI/CD

on:
push:
branches: [ main ]

permissions:
contents: read

jobs:
ci-workflow:
uses: ./.github/workflows/ci-prod.yml
secrets: inherit

deploy-app:

name: App Deployment
needs: ci-workflow
runs-on: ubuntu-latest
environment: Production

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: af-south-1

- name: Setup NodeJS and Cache
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Install Dependencies
run: npm install

- name: Build App
run: npm run build:app:dev

- name: Deploy App
if: success()
run: aws s3 sync ./dist/apps/app s3://fridgetoplate
8 changes: 6 additions & 2 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Development CI

on:
push:
branches: [ dev, feat/* ]
branches: [ feat/* ]
pull_request:
branches: [ dev, feat/* ]
workflow_call:
secrets:
SONAR_TOKEN_API:
required: true

permissions:
contents: read
Expand Down Expand Up @@ -82,4 +86,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_APP }}
with:
projectBaseDir: apps/app/
projectBaseDir: apps/app/
6 changes: 4 additions & 2 deletions .github/workflows/ci-prod.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Production CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call:
secrets:
SONAR_TOKEN_API:
required: true

permissions:
contents: read
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ testem.log
.DS_Store
Thumbs.db

.angular
#Application Folders
.angular
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Spice Girls Inc.
## FridgeToPlate
# Spice Girls Inc. - FridgeToPlate - Project Description

<!-- [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=COS301-SE-2023_FridgeToPlate&metric=coverage)](https://sonarcloud.io/summary/new_code?id=COS301-SE-2023_FridgeToPlate) -->
![Website](https://img.shields.io/website?url=http%3A%2F%2Fdev-fridgetoplate.s3-website.af-south-1.amazonaws.com%2F)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=COS301-SE-2023_FridgeToPlate&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=COS301-SE-2023_FridgeToPlate)
![GitHub issues](https://img.shields.io/github/issues-raw/COS301-SE-2023/FridgeToPlate)
[![Commits](https://img.shields.io/github/commit-activity/w/COS301-SE-2023/WriteToPdf)](https://github.com/COS301-SE-2023/WriteToPdf/issues)

FridgeToPlate is a user-friendly app that utilizes preference AI and relational database models to gather recipes based on the ingredients found in the user's fridge. By providing access to delicious and wholesome meal ideas, this product aims to elevate the user's cooking experience.

Expand Down Expand Up @@ -48,8 +53,7 @@ I am a final year computer science student with a burning passion for learning m
</a><br>

### Simphiwe Nonabe
I am a 3rd year Computer Science student who constantly seeks opportunities wherein I can improve
my knowledge and skillset for the betterment of myself, those around me and my environment. I can work by myself and with a team. I can work well under immense pressure, and I always attempt to do my absolute best at every task in which I partake as I believe that it is not necessarily what you do that counts but rather how you do it, as that often determines the level of your success. I believe that I possess exceptional qualities which make me extremely helpful and useful in different working environments and if, by chance, I do not then I am willing to put in the time and energy to learn.
I am a 3rd year Computer Science student who constantly seeks opportunities wherein I can improve my knowledge and skillset for the betterment of myself, those around me and my environment. I can work by myself and with a team, even when under immense pressure. I believe that I possess exceptional qualities which make me extremely helpful and useful in different working environments.

<a href="https://github.com/simphiwe-nonabe">
<img alt="ion" src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" />
Expand Down Expand Up @@ -88,14 +92,18 @@ my knowledge and skillset for the betterment of myself, those around me and my e
</a><br>

## Project Information
### Branching Technique:
**Git Flow** is a branching technique that uses two main branches, master and develop, to manage software development. Feature branches are created from develop for new features, release branches for preparing releases, and hotfix branches for critical production issues. This approach ensures a structured workflow and allows for parallel development while maintaining stability in the master branch.

### GitHub Project Board:
<a href="https://github.com/orgs/COS301-SE-2023/projects/5">
<img alt="ion" src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" />
</a>

### Functional Requirements:
### System Requirements Specification:
<a href="https://github.com/COS301-SE-2023/FridgeToPlate/wiki">
<img alt="ion" src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" />
</a>

### Demos:

3 changes: 3 additions & 0 deletions apps/api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ out/

### VS Code ###
.vscode/

### VS Code ###
.vscode/
2 changes: 1 addition & 1 deletion apps/api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

sonarqube {
properties {
property "sonar.projectKey", "FridgeToPlate-API"
property "sonar.projectKey", "COS301-SE-2023_FridgeToPlate-API"
property "sonar.organization", "cos301-se-2023"
property "sonar.host.url", "https://sonarcloud.io"
}
Expand Down
21 changes: 19 additions & 2 deletions apps/app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,25 @@
"main": "apps/app/src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "apps/app/tsconfig.app.json",
"assets": ["apps/app/src/favicon.ico", "apps/app/src/assets"],
"styles": ["apps/app/src/styles.scss"],
"assets": [
"apps/app/src/favicon.ico",
{
"glob": "**/*",
"input": "apps/app/src/assets",
"output": "assets"
},
{
"glob": "**/*.svg",
"input": "node_modules/ionicons/dist/ionicons/svg",
"output": "./svg"
}
],
"styles": [
"apps/app/src/styles.scss",
{
"input": "apps/app/src/theme/variables.scss"
}
],
"scripts": []
},
"configurations": {
Expand Down
1 change: 0 additions & 1 deletion apps/app/src/app/app.component.html

This file was deleted.

10 changes: 0 additions & 10 deletions apps/app/src/app/app.component.ts

This file was deleted.

12 changes: 0 additions & 12 deletions apps/app/src/app/app.module.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/app/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<fridge-to-plate-root></fridge-to-plate-root>
<core-shell></core-shell>
</body>

</html>
4 changes: 2 additions & 2 deletions apps/app/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import { AppModule } from "./app/app.module";
import { CoreModule } from '@fridge-to-plate/app/core';

platformBrowserDynamic()
.bootstrapModule(AppModule)
.bootstrapModule(CoreModule)
.catch((err) => console.error(err));
18 changes: 18 additions & 0 deletions apps/app/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,22 @@
@tailwind components;
@tailwind utilities;

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Wix+Madefor+Display&display=swap');

/* Core CSS required for Ionic components to work properly */
@import '~@ionic/angular/css/core.css';

/* Basic CSS for apps built with Ionic */
@import '~@ionic/angular/css/normalize.css';
@import '~@ionic/angular/css/structure.css';
@import '~@ionic/angular/css/typography.css';
@import '~@ionic/angular/css/display.css';

/* Optional CSS utils that can be commented out */
@import '~@ionic/angular/css/padding.css';
@import '~@ionic/angular/css/float-elements.css';
@import '~@ionic/angular/css/text-alignment.css';
@import '~@ionic/angular/css/text-transformation.css';
@import '~@ionic/angular/css/flex-utils.css';

/* You can add global styles to this file, and also import other style files */
File renamed without changes.
35 changes: 33 additions & 2 deletions apps/app/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,42 @@ const { join } = require('path');
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'),
join(__dirname, '../src/**/!(*.stories|*.spec).{ts,html}'),
...createGlobPatternsForDependencies(__dirname),
],
theme: {
extend: {},
extend: {
colors: {
'background-light': '#F8F8F8',
'background-dark': '#010127',
'primary': '#C35214',
'primary-highlight': '#E26310',
'accept': '#2bc917',
'reject': '#d70b0b'
},
gridTemplateRows: {
10: "repeat(10, minmax(0,1fr))",
12: "repeat(12, minmax(0,1fr))",
},
gridRowStart: {
8: "8",
9: "9",
10: "10",
},
gridRowEnd: {
8: "8",
9: '9',
10: "10",
11: "11",
12: "12",
13: "13",
},
fontFamily: {
'inter': ['Inter', 'sans-serif'],
'wix-display': ['Wix Madefor Display', 'sans-serif']
}
}

},
plugins: [],
};
36 changes: 36 additions & 0 deletions libs/app/core/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"extends": ["../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "fridgeToPlate",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "fridge-to-plate",
"style": "kebab-case"
}
]
},
"extends": [
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
]
},
{
"files": ["*.html"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
}
7 changes: 7 additions & 0 deletions libs/app/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# app-core

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test app-core` to execute the unit tests.
Loading

0 comments on commit e1389ed

Please sign in to comment.