Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0 #6

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
27b5823
Issue #PS-2245 feat: Created a new React project for Reset and forgo…
shreyas1434shinde Oct 22, 2024
d632618
Merge pull request #1 from shreyas1434shinde/main
itsvick Oct 22, 2024
d40788c
Issue #PS-2245 feat: Created a new React project for Reset and forgo…
shreyas1434shinde Oct 22, 2024
e900021
Issue #PS-2245 feat: Created a new React project for Reset and forgo…
shreyas1434shinde Oct 22, 2024
ef95277
Merge pull request #2 from shreyas1434shinde/main
itsvick Oct 22, 2024
86f3c31
Create qa-deployment.yaml
Ishan-ttpl Oct 22, 2024
459c20f
Create dev-deployment.yaml
AbhilashKD Oct 23, 2024
2f0ba61
Create prod-deployment.yaml
itsvick Oct 23, 2024
b24c482
Update prod-deployment.yaml
AbhilashKD Oct 23, 2024
beb24b0
Issue #PS-2245 fix: Created a new React project for Reset and forgot…
shreyas1434shinde Oct 23, 2024
f8e30c7
Merge branch 'release-1.0.0' of github.com:tekdi/shiksha-reset-passwo…
shreyas1434shinde Oct 23, 2024
0f17ee5
Issue #PS-0000 fix: Merge issue
shreyas1434shinde Oct 23, 2024
5f3f776
Merge pull request #4 from shreyas1434shinde/main
itsvick Oct 23, 2024
640eae0
Issue #PS-2245 fix: Created a new React project for Reset and forgot…
shreyas1434shinde Oct 23, 2024
bd0ed9c
Merge pull request #5 from shreyas1434shinde/main
itsvick Oct 24, 2024
b0aad25
Issue #PS-2245 fix: Created a new React project for Reset and forgot…
shreyas1434shinde Oct 24, 2024
7230f02
Merge branch 'release-1.0.0' of github.com:tekdi/shiksha-reset-passwo…
shreyas1434shinde Oct 24, 2024
fe30bbd
Merge pull request #7 from shreyas1434shinde/main
itsvick Oct 25, 2024
b1b91be
Issue #PS-0000 fix: Fixed build issue
itsvick Nov 6, 2024
0dc7f47
Issue #PS-0000 fix: package.json updated
shreyas1434shinde Nov 6, 2024
b9e3c2c
Issue #PS-0000 fix: package.json updated
shreyas1434shinde Nov 6, 2024
c2cafee
Issue #PS-0000 fix: Fixed build issue
itsvick Nov 6, 2024
fbbdb85
Issue #PS-0000 fix: Replace current page when redirecting
itsvick Nov 9, 2024
69d03d5
Merge branch 'release-1.0.0' of github.com:tekdi/shiksha-reset-passwo…
shreyas1434shinde Nov 22, 2024
7b42ee5
add middleware URL
shreyas1434shinde Nov 22, 2024
76c45a0
add middleware URL
shreyas1434shinde Nov 22, 2024
1dca47d
add middleware URL
shreyas1434shinde Nov 22, 2024
b312f49
Merge pull request #9 from shreyas1434shinde/resetpassowrds
itsvick Nov 22, 2024
4898032
Issue #PS-0000 fix: Updated password reset url
itsvick Nov 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/dev-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: S3 Deployment on the Pratham-DEV

on:
workflow_dispatch:
jobs:
s3_deployment_dev:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: npm install, build
run: |
ls -ltra
if [ -f .env ]; then
rm .env
fi
echo '${{ secrets.DEV_ENV }}' > .env
ls -ltra
npm install --force
npm install --legacy-peer-deps
npm run build
ls -ltra
- name: Show PWD
run: |
echo "Current Working Directory:"
pwd

- name: List Contents
run: |
echo "Contents of the current directory (in reverse order):"
ls -lr

- name: List Contents
run: |
echo "Contents of the dist directory (in reverse order):"
cd
ls -lr

- name: Install AWS CLI
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y awscli

- name: Configure AWS credentials
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set default.region ${{ secrets.AWS_S3_BUCKET_REGION }}

- name: Upload to s3 Bucket
run: |
aws s3 sync dist s3://${{ secrets.AWS_S3_BUCKET_DEV }}/
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_DEV }} --paths "/*"
83 changes: 83 additions & 0 deletions .github/workflows/prod-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: S3 Deployment on the Pratham-PROD

on:
push:
tags:
- "v*" # Trigger workflow on tag pushes matching the pattern 'v*'
branches:
- release-1.0.0 # Specify the release branch where tags will trigger the workflow
- main

jobs:
s3_deployment_PROD:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure all tags are fetched

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: Set TAG environment variable
id: get_tag
run: |
# Extract the tag from the ref and set it as an environment variable
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Debug TAG value
run: |
# Print the TAG value to ensure the correct tag is being used
echo "TAG value - ${{ env.TAG }}"

- name: Checkout to the specific tag
run: |
# Checkout the code at the specified tag without creating a new branch
git checkout tags/${{ env.TAG }}

- name: npm install and build
run: |
ls -ltra
if [ -f .env ]; then
rm .env
fi
echo '${{ secrets.PROD_ENV }}' > .env
ls -ltra
npm install --force
npm install --legacy-peer-deps
npm run build
ls -ltra

- name: Show PWD
run: |
echo "Current Working Directory:"
pwd

- name: List Contents
run: |
echo "Contents of the current directory (in reverse order):"
ls -lr

- name: List Contents
run: |
echo "Contents of the dist directory (in reverse order):"
cd
ls -lr

- name: Install AWS CLI
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y awscli

- name: Configure AWS credentials
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set default.region ${{ secrets.AWS_S3_BUCKET_REGION }}

- name: Upload to s3 Bucket
run: |
aws s3 sync dist s3://${{ secrets.AWS_S3_BUCKET_PROD }}/
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_PROD }} --paths "/*"
59 changes: 59 additions & 0 deletions .github/workflows/qa-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: S3 Deployment on the Pratham-qa

on:
push:
branches:
- release-1.0.0
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: npm install, build
run: |
ls -ltra
if [ -f .env ]; then
rm .env
fi
echo '${{ secrets.QA_ENV }}' > .env
ls -ltra
npm install --force
npm install --legacy-peer-deps
npm run build
ls -ltra
- name: Show PWD
run: |
echo "Current Working Directory:"
pwd

- name: List Contents
run: |
echo "Contents of the current directory (in reverse order):"
ls -lr

- name: List Contents
run: |
echo "Contents of the dist directory (in reverse order):"
cd
ls -lr

- name: Install AWS CLI
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y awscli

- name: Configure AWS credentials
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set default.region ${{ secrets.AWS_S3_BUCKET_REGION }}

- name: Upload to s3 Bucket
run: |
aws s3 sync dist s3://${{ secrets.AWS_S3_BUCKET }}/
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.env


dist/
build/


# TypeScript build info
tsconfig.app.tsbuildinfo
tsconfig.node.tsbuildinfo
package-lock.json
51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
# shiksha-reset-password
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:

```js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
})
```
28 changes: 28 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
17 changes: 17 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link
rel="icon"
type="image/svg+xml"
href="./src/assets/images/favicon.ico"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pratham Reset your Password</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
41 changes: 41 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "forgotpassword",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.15.15",
"@mui/material": "5.15.21",
"axios": "^1.7.7",
"i18next": "^23.16.0",
"jwt-decode": "^4.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-ga4": "^2.1.0",
"react-jwt": "^1.2.2",
"react-router-dom": "^6.27.0",
"react-toastify": "^10.0.6"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@types/node": "^22.7.6",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"eslint": "^9.11.1",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.12",
"globals": "^15.9.0",
"typescript": "^5.5.3",
"typescript-eslint": "^8.7.0",
"vite": "^5.4.8"
}
}
1 change: 1 addition & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /index.html 200
1 change: 1 addition & 0 deletions public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added src/App.css
Empty file.
Loading