Skip to content

Commit

Permalink
feat(frontend, ci): add configurations
Browse files Browse the repository at this point in the history
* feat: add connection to db

* feat: add gitignore file

* feat: create context by db

* feat : update gitignore file

* feat: init react app

* feat: add swagger

* fix: change swagger connection

* feat(backend): add home controller

* feat: add report controler

* refactor: change report controller

* feat: add header component

* feat: add home button

* feat: add create project button

* fix: fix the location of the create button

* feat: add search bar

* feat: add project card

* faet: add overlay

* feat: create report page

* feat: add MUI

* feat(frontend): add search bar

* feat(lead): global refactoring with drop of .net, adding semantic and change dir overview

* fix(.gitignore): add usage of master ignore file

---------

Co-authored-by: Marat Zimnurov <[email protected]>
  • Loading branch information
Melichka and the-homeless-god committed Aug 15, 2024
1 parent ff03f07 commit d78557d
Show file tree
Hide file tree
Showing 65 changed files with 11,632 additions and 3 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: deployment

on:
push:
branches:
- master
paths:
- ".github/workflows/**"
- "application/frontend/**"

jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
issues: write
contents: write
pull-requests: write
defaults:
run:
working-directory: application/frontend
steps:
- uses: actions/checkout@v3
- run: echo '${{toJSON(github.event.head_commit)}}'
- name: telegram notifications
run: |
msg_text='New push to master:
```json
${{github.event.head_commit.author.name}}:
${{github.event.head_commit.message}}
```
[url](${{github.event.head_commit.url}})
'
curl -s -X POST 'https://api.telegram.org/bot${{ secrets.TG_TOKEN }}/sendMessage' \
-d "parse_mode=MarkdownV2&chat_id=${{ secrets.TG_CHAT_ID }}&text=${msg_text}&reply_to_message_id=${{ secrets.TG_MSG_ID }}"
- uses: actions/setup-node@v3
with:
node-version: 21.1.0
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- run: npm ci
# - run: npm run format
# - run: npm run test
- run: npm run build

- name: release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
pull_request:
branches:
- dev
- master

name: validation of code
jobs:
build:
defaults:
run:
working-directory: application/frontend
name: linters, tests and build
runs-on: ubuntu-latest
timeout-minutes: 10

permissions:
issues: write
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v3
- name: telegram notifications
if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }}
run: |
msg_text='New pull request to master:
Title:
```json
${{github.event.pull_request.title}}
```
[Link](${{github.event.pull_request.html_url}})
'
curl -s -X POST 'https://api.telegram.org/bot${{ secrets.TG_TOKEN }}/sendMessage' \
-d "parse_mode=MarkdownV2&chat_id=${{ secrets.TG_CHAT_ID }}&text=${msg_text}&reply_to_message_id=${{ secrets.TG_MSG_ID }}"
- uses: actions/setup-node@v3
with:
node-version: v21.1.0
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- run: npm ci
# - run: npm run format
# - run: npm run test:coverage
- run: npm run build
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,3 @@ node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*

application/TrafficLight/obj/

1 change: 1 addition & 0 deletions application/frontend/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 1 addition & 0 deletions application/frontend/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v21.1.0
70 changes: 70 additions & 0 deletions application/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
26 changes: 26 additions & 0 deletions application/frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<title>React App</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>

</body>

</html>
Loading

0 comments on commit d78557d

Please sign in to comment.