Skip to content

Commit 87aa057

Browse files
Merge pull request #324 from CivicDataLab/dev
Bring production upto date
2 parents 42be6fa + 0242ba9 commit 87aa057

File tree

73 files changed

+7443
-4513
lines changed

Some content is hidden

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

73 files changed

+7443
-4513
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.next
3+
.git
4+
.env
5+
Dockerfile
6+
docker-compose.yml

.env.local.example

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Authentication System variables
2+
KEYCLOAK_CLIENT_ID='keycloakid'
3+
KEYCLOAK_CLIENT_SECRET='keycloaksecret'
4+
AUTH_ISSUER=https://keycloakdomain.com/auth/realms/keycloakrealm
5+
NEXTAUTH_URL=http://localhost:3000
6+
NEXTAUTH_SECRET='nextauthsecret'
7+
END_SESSION_URL=https://keycloakdomain.com/auth/realms/keycloakrealm/protocol/openid-connect/logout
8+
REFRESH_TOKEN_URL=https://keycloakdomain.com/auth/realms/keycloakrealm/protocol/openid-connect/token
9+
10+
# # Backend System variables
11+
NEXT_PUBLIC_BACKEND_URL= https://backendurl
12+
BACKEND_URL= https://backendurl
13+
14+
NEXT_PUBLIC_BACKEND_GRAPHQL_URL=https://backendurl/api/graphql
15+
BACKEND_GRAPHQL_URL=https://backendurl/api/graphql
16+
17+
NEXT_PUBLIC_ENABLE_ACCESSMODEL = 'false'
18+
NEXT_PUBLIC_ANALYTICS_URL ='https://analyticsurl'
19+
20+
21+
# # Sentry feature related env varibale
22+
SENTRY_FEATURE_ENABLED='true'
23+
SENTRY_AUTH_TOKEN='sentryauthtoken'
24+
SENTRY_DSN_URL=https://sentrydsnurl
25+
NEXT_PUBLIC_SENTRY_DSN_URL=https://sentrydsnurl
26+
SENTRY_ORG_NAME='orgname'
27+
SENTRY_PROJECT_NAME='projectname'
28+
NEXT_PUBLIC_PLATFORM_URL = 'https://platformurl'
29+
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Bug Report
2+
description: File a bug report to help us improve
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
assignees: []
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this bug report!
11+
- type: input
12+
id: contact
13+
attributes:
14+
label: Contact Details
15+
description: How can we get in touch with you if we need more info?
16+
placeholder: ex. [email protected]
17+
validations:
18+
required: false
19+
- type: textarea
20+
id: what-happened
21+
attributes:
22+
label: What happened?
23+
description: Also tell us, what did you expect to happen?
24+
placeholder: Tell us what you see!
25+
value: "A bug happened!"
26+
validations:
27+
required: true
28+
- type: textarea
29+
id: reproduce
30+
attributes:
31+
label: Steps to Reproduce
32+
description: Please provide detailed steps to reproduce the issue
33+
placeholder: |
34+
1. Go to '...'
35+
2. Click on '....'
36+
3. Scroll down to '....'
37+
4. See error
38+
validations:
39+
required: true
40+
- type: dropdown
41+
id: version
42+
attributes:
43+
label: Version
44+
description: What version of our software are you running?
45+
options:
46+
- main (latest)
47+
- dev
48+
- Other (please specify in description)
49+
validations:
50+
required: true
51+
- type: dropdown
52+
id: browsers
53+
attributes:
54+
label: What browsers are you seeing the problem on?
55+
multiple: true
56+
options:
57+
- Firefox
58+
- Chrome
59+
- Safari
60+
- Microsoft Edge
61+
- Other
62+
- type: dropdown
63+
id: device
64+
attributes:
65+
label: What device are you using?
66+
multiple: true
67+
options:
68+
- Desktop
69+
- Mobile
70+
- Tablet
71+
- type: textarea
72+
id: logs
73+
attributes:
74+
label: Relevant log output
75+
description: Please copy and paste any relevant log output from browser console. This will be automatically formatted into code, so no need for backticks.
76+
render: shell
77+
- type: checkboxes
78+
id: terms
79+
attributes:
80+
label: Code of Conduct
81+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/CivicDataLab/DataSpaceFrontend/blob/main/CODE_OF_CONDUCT.md)
82+
options:
83+
- label: I agree to follow this project's Code of Conduct
84+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: GitHub Discussions
4+
url: https://github.com/CivicDataLab/DataSpaceFrontend/discussions
5+
about: Ask questions and discuss ideas with the community
6+
- name: Security Issues
7+
url: mailto:[email protected]
8+
about: Please report security vulnerabilities via email
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Feature Request
2+
description: Suggest an idea for this project
3+
title: "[Feature]: "
4+
labels: ["enhancement", "triage"]
5+
assignees: []
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for suggesting a new feature!
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Is your feature request related to a problem?
15+
description: A clear and concise description of what the problem is.
16+
placeholder: I'm always frustrated when [...]
17+
validations:
18+
required: false
19+
- type: textarea
20+
id: solution
21+
attributes:
22+
label: Describe the solution you'd like
23+
description: A clear and concise description of what you want to happen.
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: alternatives
28+
attributes:
29+
label: Describe alternatives you've considered
30+
description: A clear and concise description of any alternative solutions or features you've considered.
31+
validations:
32+
required: false
33+
- type: dropdown
34+
id: component
35+
attributes:
36+
label: Which component does this relate to?
37+
multiple: true
38+
options:
39+
- UI/UX
40+
- Authentication
41+
- Data Visualization
42+
- Search
43+
- Navigation
44+
- Performance
45+
- Accessibility
46+
- Documentation
47+
- Testing
48+
- Other
49+
- type: textarea
50+
id: additional-context
51+
attributes:
52+
label: Additional context
53+
description: Add any other context or screenshots about the feature request here.
54+
validations:
55+
required: false
56+
- type: checkboxes
57+
id: terms
58+
attributes:
59+
label: Code of Conduct
60+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/CivicDataLab/DataSpaceFrontend/blob/main/CODE_OF_CONDUCT.md)
61+
options:
62+
- label: I agree to follow this project's Code of Conduct
63+
required: true

.github/pull_request_template.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Pull Request
2+
3+
## Description
4+
5+
Brief description of the changes introduced by this PR.
6+
7+
## Type of Change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] Documentation update
15+
- [ ] Performance improvement
16+
- [ ] Code refactoring
17+
- [ ] Test improvements
18+
- [ ] UI/UX improvements
19+
20+
## Related Issues
21+
22+
Fixes #(issue number)
23+
Closes #(issue number)
24+
Relates to #(issue number)
25+
26+
## Changes Made
27+
28+
- [ ] Change 1
29+
- [ ] Change 2
30+
- [ ] Change 3
31+
32+
## Testing
33+
34+
- [ ] I have tested this change manually
35+
- [ ] I have added/updated tests for my changes
36+
- [ ] All existing tests pass
37+
- [ ] I have tested on multiple browsers (if applicable)
38+
- [ ] I have tested on mobile devices (if applicable)
39+
40+
### Test Instructions
41+
42+
Please describe how reviewers can test your changes:
43+
44+
1. Step 1
45+
2. Step 2
46+
3. Step 3
47+
48+
## Screenshots (if applicable)
49+
50+
Add screenshots to help explain your changes, especially for UI changes.
51+
52+
## Checklist
53+
54+
- [ ] My code follows the style guidelines of this project
55+
- [ ] I have performed a self-review of my own code
56+
- [ ] I have commented my code, particularly in hard-to-understand areas
57+
- [ ] I have made corresponding changes to the documentation
58+
- [ ] My changes generate no new warnings
59+
- [ ] I have run `npm run lint` and fixed any issues
60+
- [ ] I have run `npm run build` successfully
61+
- [ ] I have tested the changes in development mode
62+
- [ ] Any dependent changes have been merged and published in downstream modules
63+
64+
## Performance Impact
65+
66+
- [ ] No performance impact
67+
- [ ] Positive performance impact
68+
- [ ] Negative performance impact (please explain)
69+
70+
## Accessibility
71+
72+
- [ ] I have tested keyboard navigation
73+
- [ ] I have tested with screen readers (if applicable)
74+
- [ ] I have ensured proper color contrast
75+
- [ ] I have added appropriate ARIA labels (if applicable)
76+
77+
## Additional Notes
78+
79+
Add any additional notes or context about the PR here.

.github/workflows/deploy-Dataspace-dev.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ on:
44
push:
55
branches: ['dev']
66
env:
7-
KEYCLOAK_CLIENT_ID: ${{secrets.KEYCLOAK_CLIENT_ID}}
8-
KEYCLOAK_CLIENT_SECRET: ${{secrets.KEYCLOAK_CLIENT_SECRET}}
9-
AUTH_ISSUER: ${{secrets.AUTH_ISSUER}}
10-
NEXTAUTH_URL: 'https://dev.civicdataspace.in/'
11-
NEXT_PUBLIC_NEXTAUTH_URL: 'https://dev.civicdataspace.in/'
7+
KEYCLOAK_CLIENT_ID: 'dataspace'
8+
KEYCLOAK_CLIENT_SECRET: 'Q2iHhyXNOqOu7Xaln7Z45QrDnbff13eu'
9+
AUTH_ISSUER: 'https://opub-kc.civicdatalab.in/auth/realms/DataSpace'
10+
NEXTAUTH_URL: 'https://dev.civicdataspace.in'
11+
NEXT_PUBLIC_NEXTAUTH_URL: 'https://dev.civicdataspace.in'
1212
NEXTAUTH_SECRET: ${{secrets.NEXTAUTH_SECRET}}
13-
END_SESSION_URL: ${{secrets.END_SESSION_URL}}
14-
REFRESH_TOKEN_URL: ${{secrets.REFRESH_TOKEN_URL}}
15-
NEXT_PUBLIC_BACKEND_URL: ${{secrets.NEXT_PUBLIC_BACKEND_URL_DEV_DS}}
16-
BACKEND_GRAPHQL_URL: ${{secrets.BACKEND_GRAPHQL_URL_DEV_DS}}
13+
END_SESSION_URL: 'https://opub-kc.civicdatalab.in/auth/realms/DataSpace/protocol/openid-connect/logout'
14+
REFRESH_TOKEN_URL: 'https://opub-kc.civicdatalab.in/auth/realms/DataSpace/protocol/openid-connect/token'
15+
NEXT_PUBLIC_BACKEND_URL: 'https://dev.api.civicdataspace.in'
16+
BACKEND_GRAPHQL_URL: 'https://dev.api.civicdataspace.in/api/graphql'
1717
NEXT_PUBLIC_ENABLE_ACCESSMODEL: ${{secrets.NEXT_PUBLIC_ENABLE_ACCESSMODEL_DS}}
18-
NEXT_PUBLIC_BACKEND_GRAPHQL_URL: ${{secrets.NEXT_PUBLIC_BACKEND_GRAPHQL_URL_DEV_DS}}
19-
BACKEND_URL: ${{secrets.BACKEND_URL_DEV}}
20-
NEXT_PUBLIC_PLATFORM_URL: ${{secrets.NEXT_PUBLIC_PLATFORM_URL_DEV}}
18+
NEXT_PUBLIC_BACKEND_GRAPHQL_URL: 'https://dev.api.civicdataspace.in/api/graphql'
19+
BACKEND_URL: 'https://dev.api.civicdataspace.in'
20+
NEXT_PUBLIC_PLATFORM_URL: 'https://dev.civicdataspace.in'
2121
NEXT_PUBLIC_ANALYTICS_URL: ${{secrets.NEXT_PUBLIC_ANALYTICS_URL}}
2222

2323

.github/workflows/pre-merge.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ env:
2222
NEXT_PUBLIC_PLATFORM_URL: ${{secrets.NEXT_PUBLIC_PLATFORM_URL_DEV}}
2323
NEXT_PUBLIC_ANALYTICS_URL: ${{secrets.NEXT_PUBLIC_ANALYTICS_URL}}
2424

25-
2625
jobs:
2726
build:
2827
runs-on: ubuntu-latest
@@ -31,9 +30,6 @@ jobs:
3130
matrix:
3231
node-version: [20.x]
3332

34-
env:
35-
BACKEND_GRAPHQL_URL: ${{secrets.BACKEND_GRAPHQL_URL_DS}}
36-
3733
steps:
3834
- uses: actions/checkout@v4
3935
- name: Use Node.js ${{ matrix.node-version }}
@@ -42,6 +38,37 @@ jobs:
4238
node-version: ${{ matrix.node-version }}
4339
cache: 'npm'
4440

45-
- run: npm ci --force
46-
- run: npm run generate
47-
- run: npm run build --if-present
41+
- name: Install dependencies
42+
run: npm ci --force
43+
44+
- name: Generate GraphQL types (CI-safe)
45+
run: |
46+
# Ensure generated directory exists
47+
mkdir -p ./gql/generated
48+
49+
# Try to generate with timeout and fallback
50+
timeout 60s npm run generate:ci || {
51+
echo "GraphQL codegen failed or timed out, checking for existing files..."
52+
if [ -d "./gql/generated" ] && [ "$(ls -A ./gql/generated 2>/dev/null)" ]; then
53+
echo "Using existing generated files"
54+
else
55+
echo "Creating minimal generated files for build to proceed"
56+
echo "// Auto-generated fallback file for CI builds" > ./gql/generated/index.ts
57+
echo "export type Maybe<T> = T | null;" >> ./gql/generated/index.ts
58+
echo "export type Scalars = {" >> ./gql/generated/index.ts
59+
echo " ID: string;" >> ./gql/generated/index.ts
60+
echo " String: string;" >> ./gql/generated/index.ts
61+
echo " Boolean: boolean;" >> ./gql/generated/index.ts
62+
echo " Int: number;" >> ./gql/generated/index.ts
63+
echo " Float: number;" >> ./gql/generated/index.ts
64+
echo "};" >> ./gql/generated/index.ts
65+
echo "export {};" >> ./gql/generated/index.ts
66+
echo "Created fallback generated files"
67+
fi
68+
}
69+
env:
70+
BACKEND_GRAPHQL_URL: ${{secrets.BACKEND_GRAPHQL_URL_DEV_DS}}
71+
NODE_ENV: 'production'
72+
73+
- name: Build application
74+
run: npm run build --if-present

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ yarn-debug.log*
2525
yarn-error.log*
2626

2727
# local env files
28-
.env*.local*
28+
.env*.local
2929

3030
# vercel
3131
.vercel
@@ -39,4 +39,5 @@ next-env.d.ts
3939

4040
# generated graphql files
4141
/gql/generated/gql.ts
42-
/gql/generated/graphql.ts
42+
/gql/generated/graphql.ts
43+
/gql/generated/

0 commit comments

Comments
 (0)