Skip to content

Commit

Permalink
Merge codebase to master branch (#130)
Browse files Browse the repository at this point in the history
* Api setup.

* Swagger setup

* Api for static pages.

* chore: add initial setup for the frontend part

* docs: update main README.md file for the frontend app

* Api for static pages.

* Added routing and initial structure

* Code review changes

* Added react-bulma-components

* added dummy json files

* feat: initial header

* chore: add .nvmrc and .editorconfig

* chore: add eslint script and husky pre-commit hook

* refactor: change single to double quotes

* refactor: fix warning by adding alt to images

* chore: add eslint GitHub action

* fix: remove build dir from git

* Update decision-tree.json

* Update and rename decision-tree.json to static-page-with-decision-tree.json

* Update static-page.json

* Update useful-app.json

* Refactor/global styles (#43)

* chore: update global styling, removed custom elements, added mobile friendly css for the header, added node-sass

* chore: fixed formatting

* Update frontend/src/components/Header/Header.scss

Co-Authored-By: Dan Lepadatu <[email protected]>

Co-authored-by: Dan Lepadatu <[email protected]>

* Feature/about page (#42)

* chore: create about page layout

* chore: added useful informations section

* chore: added some mobile friendly css

* chore: added node-sass

* fix: update custom elements to classes, removed ids, fixed formatting, added target to <a> tags

* chore: update app content width

* fix: fixed app content height

* chore: update content width

* Azure pipelines (#41)

* Set up CI with Azure Pipelines

[skip ci]

* reorder

* remove name

* Update build.yml for Azure Pipelines

* Add badge

* update gitignore

* add empty build.yml for frontend

* Update build.yml for Azure Pipelines

* added badge for frontend as well

* add path filters

* add npm steps for frontend build

* remove test task; add publish artifact

* Feature/setup footer (#40)

* Setup footer

* Updated footer height

* Fixed linting issues

* Made code review changes

* chore: update contact info

Co-authored-by: adascaliteiradu <[email protected]>

* Update PULL_REQUEST_TEMPLATE.md

* Move dependencies to devDependencies

* added dummy data json files

* added plural

* more updates to data format

* Create CODEOWNERS

* Update README.md

* Update README.md

* chore: add taskforce-fe-components package (#50)

* added one html content page example

* added some html content to pages

* Added header and developed by components (#57)

* Update footer links (#58)

* Add fe-components package.

* Updated Footer links and replaced with Footer from fe-components.

* Added missing FooterLinks.

* Addressed review comments. Removed extra spaces and renamed Footer component file.

* Renamed Footer component.

* Feat/decision tree (#46)

* feat: created decision tree component

* chore: read data via props

* chore: use taskforce components

* chore: use function component

* Update frontend/src/components/DecisionTree/index.jsx

Co-Authored-By: Dan Lepadatu <[email protected]>

* Update frontend/src/components/DecisionTree/index.jsx

Co-Authored-By: Dan Lepadatu <[email protected]>

* Update frontend/src/components/Home.js

Co-Authored-By: Dan Lepadatu <[email protected]>

* Update frontend/src/components/DecisionTree/index.jsx

Co-Authored-By: Dan Lepadatu <[email protected]>

* Update frontend/src/components/DecisionTree/index.jsx

Co-Authored-By: Dan Lepadatu <[email protected]>

* Update frontend/src/components/DecisionTree/index.jsx

Co-Authored-By: Dan Lepadatu <[email protected]>

* chore: removed unused styles

* chore: remove default onClick because it will be implemented in the component

* chore: lint checks

Co-authored-by: Dan Lepadatu <[email protected]>

* frontpage draft (#61)

* frontpage draft

* update components package

* update static-pages file (#60)

* update static-pages file

* Content updates stati-pages

* chore: ignore data files from lint

Co-authored-by: Dan Lepadatu <[email protected]>

* add incubated by (#66)

* Add deploy to production github action (#70)

* Add deploy to production github action

* Change from master to develop

* Content update static-pages cemafac

* Update homepage intro text. (#77)

* Updated about page texts and removed instagram link. (#80)

* Add google analytics (#74)

* Add google analytics

* Update frontend/public/index.html

Co-Authored-By: Dan Lepadatu <[email protected]>

* Inject GA_TRACKING_ID only on production deploy

* Simple solution

Co-authored-by: Dan Lepadatu <[email protected]>

* Update s3 sync command (#78)

* feat: integrate list with the decision tree (#63)

* feat: integrate list with the decision tree

* Razvan/integrate decision tree again (#81)

* Break down DecisionTree into multiple components; add question types

* remove lint from navel

* implement review suggestions

* add missing bulma import

* update form buttons

* chore: cleanup static data

* fix: keep state of the selected option

Co-authored-by: Razvan Ciuca <[email protected]>

* removed dummy json data files

* Update README.md

* Add favicons (#76)

* Add favicons

* Change description

* Change favion size

* Add r lang to html

* updated components version and developedby logo display (#83)

* updated components version and developedby logo display

* updated package-lock also

* added social share, fixed layout of about page (#73)

* added social share, fixed layout of about page

* use Hero components for layout in About page

* refactor: cleanup old styles/components and add some paddings

Co-authored-by: Dan Lepadatu <[email protected]>

* Removed link from content static-pages

* Add back acl flag (#84)

* feat: add deep linking to the item articles (#95)

* feat: add deep linking to the item articles

* feat: default to the first article of available

* fix: update react-scripts to resolve babel error

* Update results conditions (#87)

* Update results conditions

* remove logging

* chore: add exact flag to the hompage route (#99)

* Content update 2 static-pages

* Feature/small styling fixes (#98)

* added footer top margin

* temporarily hide some menu items

* changed tab title closes #91

* feat: use accordion component (#104)

* updated footer links (#105)

* Remove json files from data. Default to / for transmitere si simptome page (#102)

* Update README.md

* Remove react-bulma-components and index.scss (#106)

* Update README.md

* Feature/load instruments data (#75)

* chore: load instruments from json file

* chore: added sort by display_order

* chore: update

* added stiri oficiale box data (#82)

* added stiri oficiale box data

* updates sidebar item title

* updated useful apps in sidebar

* chore: refactor - extract duplicate code

Co-authored-by: Irina Borozan <[email protected]>

* Compress image. Remove unused image and js (#110)

* added yellow instruments app (#108)

* chore: load instruments from json file

* chore: added sort by display_order

* chore: update

* added stiri oficiale box data (#82)

* added stiri oficiale box data

* updates sidebar item title

* updated useful apps in sidebar

* added yellow instruments app

* commented out search input as it is not yet implemented

* cleanup search box for now and add instruments box in about

* added correct components version

* fixed display of new app type on home page and about

* fixed linter errors

* added top banner

* fixed other linter issues

* updated components version

Co-authored-by: adascaliteiradu <[email protected]>

* added meta info (#109)

* added meta info

* fixed image link

* added social share image

* absolute url for social image

* added type also

* refactor: improve some styles (#114)

* chore: bump fe-components version

* styles: add horizontal padding to the container class

* refactor: move SocialShare component below the article title

* [Feature] Sidebar menu navigation (#115)

* added subpages in content

* split cum ne protejam content into pages

* split adaptare content into pages

* slugs for subpages

* feat: add sidebar menu functionality

Co-authored-by: Irina Borozan <[email protected]>

* updated content texts (#117)

* Add Cloudfront invalidation (#118)

* Add aside, main and alt attr (#116)

* Content edits static-pages

* added code for romania link in footer (#125)

* added sponsors to about page (#119)

* added sponsors to about page

* fix lint issues

* added sponsor image locally

* reorganised about instruments list

* fix linting issues

* Update index.js

* Content changes to About page

* fixed lint issues

* updated version for components (#126)

* updated version for components

* fixed instruments links

* lint issue fixed

* Content update answers assessment static-pages

* Update content link stiri oficiale in first page

* Update links in text in About Page 

- added links to 
Guvernul Romania
ADR 
DSU
in third paragraph

* calm down linter

* styles: hide main menu and instruments on non-desktop devices (#128)

* Prepare deployment to production env (#129)

* Prepare deployment to production env

* Update .github/workflows/deploy.yml

Co-Authored-By: Andrei Ioniță <[email protected]>

* Update according to PR comments

Co-authored-by: Andrei Ioniță <[email protected]>

Co-authored-by: trupci <[email protected]>
Co-authored-by: Alexandru Puiu Albu <[email protected]>
Co-authored-by: Alex Albu <[email protected]>
Co-authored-by: trupci <[email protected]>
Co-authored-by: Dan Lepadatu <[email protected]>
Co-authored-by: AndreiMitrea <[email protected]>
Co-authored-by: adascaliteiradu <[email protected]>
Co-authored-by: Irina Borozan <[email protected]>
Co-authored-by: vizu <[email protected]>
Co-authored-by: Utwo <[email protected]>
Co-authored-by: anca <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: Razvan Ciuca <[email protected]>
Co-authored-by: Olivia Vereha <[email protected]>
Co-authored-by: Andrei Ioniță <[email protected]>
  • Loading branch information
16 people authored Mar 23, 2020
1 parent 5674e6d commit 98af88d
Show file tree
Hide file tree
Showing 73 changed files with 20,344 additions and 34 deletions.
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# they will be requested for review when someone
# opens a pull request.
* @moonflare @Utwo @aniri

# More details on creating a codeowners file:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
14 changes: 0 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
### Requirements for making a pull request

Thank you for contributing to our project!

Please fill out the template below to help the project maintainers review it as fast as possible and include your contribution to the project.

### What does it fix?

Closes <!-- If it is related to an open issue, please link the issue here. -->

Please mention the main changes this PR brings.

### How has it been tested?

Please describe the tests that you ran to verify your changes.

<!-- If applicable, mention any known issues with the pull request -->
70 changes: 70 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Production Build and Deploy
on:
push:
branches:
- develop
- master

env:
AWS_S3_BUCKET_TEST: ${{ secrets.AWS_S3_BUCKET_TEST }}
AWS_S3_BUCKET_PROD: ${{ secrets.AWS_S3_BUCKET_PROD }}
DISTRIBUTION_ID_TEST: ${{ secrets.DISTRIBUTION_ID_TEST }}
DISTRIBUTION_ID_PROD: ${{ secrets.DISTRIBUTION_ID_PROD }}
PATHS: '/*'
SOURCE_DIR: "./frontend/build"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}

jobs:
deploy:
runs-on: ubuntu-latest
env:
working-directory: "./frontend"
steps:
- uses: actions/checkout@v2

- name: Install node
uses: actions/setup-node@v1
with:
node-version: "12.x"

- name: Install Dependencies
working-directory: ${{env.working-directory}}
run: npm ci --no-audit

- name: Lint
working-directory: ${{env.working-directory}}
run: npm run lint

- name: Build
working-directory: ${{env.working-directory}}
run: npm run build

- name: Deploy to S3 Staging
if: github.ref == 'refs/heads/develop'
uses: jakejarvis/[email protected]
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: $AWS_S3_BUCKET_TEST

- name: Invalidate Cloudfront Staging
if: github.ref == 'refs/heads/develop'
uses: muratiger/invalidate-cloudfront-and-wait-for-completion-action@master
env:
DISTRIBUTION_ID: $DISTRIBUTION_ID_TEST

- name: Deploy to S3 Production
if: github.ref == 'refs/heads/master'
uses: jakejarvis/[email protected]
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: $AWS_S3_BUCKET_PROD

- name: Invalidate Cloudfront Production
if: github.ref == 'refs/heads/master'
uses: muratiger/invalidate-cloudfront-and-wait-for-completion-action@master
env:
DISTRIBUTION_ID: $DISTRIBUTION_ID_PROD
31 changes: 31 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ESLint Check

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]

jobs:
build:
runs-on: ubuntu-latest
env:
working-directory: "./frontend"

steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install dependencies
working-directory: ${{env.working-directory}}
run: npm ci

- name: Run ESLint check
working-directory: ${{env.working-directory}}
run: |
npm run lint
env:
CI: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.vscode
/api/Decisions.Api/staticPages
*/node_modules/
frontend/build

/.idea
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# Ce mă fac
# Ce mă fac - Web platform with guides & questionnaires

[![License: MPL 2.0](https://img.shields.io/badge/license-MPL%202.0-brightgreen.svg?style=for-the-badge)](https://opensource.org/licenses/MPL-2.0)
[![GitHub contributors](https://img.shields.io/github/contributors/code4romania/ce-ma-fac.svg?style=for-the-badge)](https://github.com/code4romania/ce-ma-fac/graphs/contributors) [![GitHub last commit](https://img.shields.io/github/last-commit/code4romania/ce-ma-fac.svg?style=for-the-badge)](https://github.com/code4romania/ce-ma-fac/commits/master) [![License: MPL 2.0](https://img.shields.io/badge/license-MPL%202.0-brightgreen.svg?style=for-the-badge)](https://opensource.org/licenses/MPL-2.0)

Arbore decizional pentru informarea publicului
[See the project live](https://cemafac.ro/)

Obiectiv: Informarea clară și eficientă a publicului, creșterea gradului de respectare a regulilor.
Objective: Clear information of the public, increase in the level of proper actions taken.

Cum: O platformă web cu ghiduri, chestionare și arbori decizionali care ajută populația să înțeleaga situația și îi ghidează în ceea ce trebuie să facă.
How: Web platform with guides, questionnaires, and decision trees which can help the population understand the current situation and guides them through what steps need to be taken.

[See the project live](insert_link_here)

[Contributing](#contributing) | [Built with](#built-with) | [Repos and projects](#repos-and-projects) | [Deployment](#deployment) | [Feedback](#feedback) | [License](#license) | [About Code4Ro](#about-code4ro)
[Contributing](#contributing) | [Built with](#built-with) | [Repos and projects](#repos-and-projects) | [Development](#development) | [Deployment](#deployment) | [Feedback](#feedback) | [License](#license) | [About Code4Ro](#about-code4ro)

## Contributing

Expand All @@ -19,28 +17,34 @@ This project is built by amazing volunteers and you can be one of them! Here's a
## Built With

### Programming languages
- Javascript

### Platforms

### Frontend framework
### Frontend frameworks
- [React (16.13.*)](https://reactjs.org/)
- [Bulma (0.8.*)](https://bulma.io/)

### Package managers

### Database technology & provider
- Frontend - [NPM](https://docs.npmjs.com/)

## Repos and projects

Mention all related repos and projects.
Uses reusable components from: https://www.npmjs.com/package/@code4ro/taskforce-fe-components

## Development

### Backend
- WIP

### Frontend
- Please follow [these](/frontend/README.md#Development) instructions

## Deployment

Guide users through getting your code up and running on their own system. In this section you can talk about:
1. Installation process
2. Software dependencies
3. Latest releases
4. API references
`API`: [![Build Status](https://dev.azure.com/code4romania/monitorizare-vot-ci/_apis/build/status/ce-ma-fac/cmf-api?branchName=azure-pipelines)](https://dev.azure.com/code4romania/monitorizare-vot-ci/_build/latest?definitionId=30&branchName=azure-pipelines)
`Frontend`: [![Build Status](https://dev.azure.com/code4romania/monitorizare-vot-ci/_apis/build/status/ce-ma-fac/cmf-frontend?branchName=azure-pipelines)](https://dev.azure.com/code4romania/monitorizare-vot-ci/_build/latest?definitionId=31&branchName=azure-pipelines)

Describe and show how to build your code and run the tests.
- automatically deployed using https://zeit.co/ from PRs for testing; preview environment: https://ce-ma-fac.now.sh/
- uses github actions for deploying in prod

## Feedback

Expand Down
25 changes: 25 additions & 0 deletions api/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
Loading

0 comments on commit 98af88d

Please sign in to comment.