Skip to content

Commit b61ca0c

Browse files
authored
Merge pull request #132 from CivicDataLab/dev
Sprint 2 - Release 0.0.2
2 parents cc08f9e + cd261a8 commit b61ca0c

218 files changed

Lines changed: 40658 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'next',
7+
'prettier',
8+
],
9+
rules: {
10+
'no-unused-vars': 'off',
11+
'@typescript-eslint/no-unused-vars': ['warn'],
12+
'@typescript-eslint/no-explicit-any': ['off'],
13+
'react/display-name': 'off',
14+
'@next/next/no-html-link-for-pages': 'off',
15+
'prefer-const': 'off',
16+
'@typescript-eslint/no-var-requires': 'off',
17+
'@next/next/no-img-element': 'off',
18+
},
19+
ignorePatterns: ['**/generated/**/*.ts', 'node_modules/', 'dist/'],
20+
}

.eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"ignorePatterns": ["**/generated/**/*.ts"],
3+
"extends": ["eslint:recommended", "next"],
4+
"rules": {
5+
"no-unused-vars": "off",
6+
// "@typescript-eslint/no-unused-vars": ["warn"],
7+
"react/display-name": "off",
8+
"@next/next/no-html-link-for-pages": "off"
9+
}
10+
}

.github/workflows/pre-merge.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build Status
2+
3+
on:
4+
push:
5+
branches: ['dev']
6+
pull_request:
7+
branches: ['dev']
8+
env:
9+
KEYCLOAK_CLIENT_ID: ${{secrets.KEYCLOAK_CLIENT_ID}}
10+
KEYCLOAK_CLIENT_SECRET: ${{secrets.KEYCLOAK_CLIENT_SECRET}}
11+
AUTH_ISSUER: ${{secrets.AUTH_ISSUER}}
12+
NEXTAUTH_URL: ${{secrets.NEXTAUTH_URL}}
13+
NEXTAUTH_SECRET: ${{secrets.NEXTAUTH_SECRET}}
14+
END_SESSION_URL: ${{secrets.END_SESSION_URL}}
15+
REFRESH_TOKEN_URL: ${{secrets.REFRESH_TOKEN_URL}}
16+
NEXT_PUBLIC_BACKEND_URL: ${{secrets.NEXT_PUBLIC_BACKEND_URL}}
17+
BACKEND_GRAPHQL_URL: ${{secrets.BACKEND_GRAPHQL_URL}}
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
23+
strategy:
24+
matrix:
25+
node-version: [20.x]
26+
27+
env:
28+
BACKEND_GRAPHQL_URL: ${{secrets.BACKEND_GRAPHQL_URL}}
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
cache: 'npm'
37+
38+
- run: npm ci --force
39+
- run: npm run generate
40+
- run: npm run build --if-present

.github/workflows/push-to-ec2.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Push-to-EC2
2+
3+
on: push
4+
5+
jobs:
6+
deploy:
7+
name: Push to EC2 Instance
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout the code
12+
uses: actions/checkout@v1
13+
14+
- name: Deploy to my EC2 instance
15+
uses: easingthemes/ssh-deploy@v2.1.5
16+
env:
17+
SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY }}
18+
SOURCE: "./"
19+
SCRIPT_BEFORE: ls
20+
REMOTE_HOST: "datakeep.civicdays.in"
21+
REMOTE_USER: "ubuntu"
22+
TARGET: "/home/ubuntu/DataExchange/DataExFrontend/"
23+
24+
- name: run the application remotely
25+
uses: appleboy/ssh-action@v1.0.3
26+
with:
27+
host: "datakeep.civicdays.in"
28+
username: "ubuntu"
29+
key: ${{ secrets.EC2_SSH_KEY }}
30+
port: 22
31+
script: |
32+
cd /home/ubuntu/DataExchange/DataExFrontend/
33+
kill $(ps aux | grep 'npm run start' | awk '{print $2}')
34+
kill $(ps aux | grep 'next-server' | awk '{print $2}')
35+
npm run build
36+
npm run generate
37+
npm run start
38+

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local*
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts
36+
37+
# intellij files
38+
.idea
39+
40+
# generated graphql files
41+
/gql/generated/gql.ts
42+
/gql/generated/graphql.ts

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint --edit

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
node_modules
3+
.next
4+
build

.prettierrc.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
endOfLine: 'lf',
3+
semi: true,
4+
trailingComma: 'es5',
5+
printWidth: 80,
6+
tabWidth: 2,
7+
useTabs: false,
8+
singleQuote: true,
9+
importOrder: [
10+
'^(react/(.*)$)|^(react$)',
11+
'^(next/(.*)$)|^(next$)',
12+
'<THIRD_PARTY_MODULES>',
13+
'',
14+
'^types$',
15+
'^@local/(.*)$',
16+
'^@/config/(.*)$',
17+
'^@/lib/(.*)$',
18+
'^@/components/(.*)$',
19+
'^@/styles/(.*)$',
20+
'^[./]',
21+
],
22+
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],
23+
plugins: [
24+
'@ianvs/prettier-plugin-sort-imports',
25+
'prettier-plugin-tailwindcss',
26+
],
27+
tailwindFunctions: ['clsx', 'cn'],
28+
};

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
3+
## [0.1.3](https://github.com/CivicDataLab/DataExFrontend/compare/0.1.2...0.1.3) (2024-04-15)
4+
5+
6+
### Features
7+
8+
* add mutation integration to the action bar in layout ([612c158](https://github.com/CivicDataLab/DataExFrontend/commit/612c15809a7213947b1e34abce31c7f6c237b5f7))
9+
10+
11+
### Bug Fixes
12+
13+
* fix the redirection link on click of the button in homepage ([b81b219](https://github.com/CivicDataLab/DataExFrontend/commit/b81b219240f83479cd9cc89d5866adb6a4ff576c))
14+
* replace hard coded url with environment variable ([7a55c94](https://github.com/CivicDataLab/DataExFrontend/commit/7a55c9491819284bfc0a6c7e7e625043e4e143f9))
15+
* routing in edit dataset layout ([991b042](https://github.com/CivicDataLab/DataExFrontend/commit/991b042f107b3149f1894404652a35cf0d06db96))
16+
17+
## [0.1.2](https://github.com/CivicDataLab/DataExFrontend/compare/0.1.1...0.1.2) (2024-04-05)
18+
19+
20+
### Bug Fixes
21+
22+
* add commit lint config file ([fc00fd5](https://github.com/CivicDataLab/DataExFrontend/commit/fc00fd51fa2ad135de3b79303aa6c1981ae34a0d))
23+
24+
## 0.1.1 (2024-04-05)
25+
26+
27+
### Bug Fixes
28+
29+
* add commit lint config file ([fc00fd5](https://github.com/CivicDataLab/DataExFrontend/commit/fc00fd51fa2ad135de3b79303aa6c1981ae34a0d))

CODE_OF_CONDUCT.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer team [private contact address](mailto:tech@civicdatalab.in). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
44+
45+
For answers to common questions about this code of conduct, see <https://www.contributor-covenant.org/faq>

0 commit comments

Comments
 (0)