Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
472 commits
Select commit Hold shift + click to select a range
100f33c
update all deps
kentcdodds Dec 11, 2020
e433214
Fix: typo in README.md for "Matthew the Muscle" desc (#143)
viglucci Dec 30, 2020
ae88090
docs: add viglucci as a contributor (#144)
allcontributors[bot] Dec 30, 2020
68e74ec
chore: ignore .eslintcache (#145)
Aprillion Dec 30, 2020
90bdc18
Update README.md
kentcdodds Jan 5, 2021
ed0bb52
update all the things
kentcdodds Jan 9, 2021
63fa3a6
update all deps
kentcdodds Jan 12, 2021
d04684a
update deps
kentcdodds Jan 13, 2021
2a1ae3b
update sw
kentcdodds Jan 16, 2021
0bffc4f
update deps
kentcdodds Jan 16, 2021
fe10f17
add ts to simplify migration
kentcdodds Jan 16, 2021
757c9e1
HMR actually works now! Hooray!
kentcdodds Jan 29, 2021
01f88d8
update all deps
kentcdodds Jan 30, 2021
7ba6f71
update workshop app
kentcdodds Feb 2, 2021
1bc4d5b
update to latest workshop app
kentcdodds Mar 5, 2021
bdf7fa9
add nancy the notepad
kentcdodds Mar 5, 2021
27216ff
fix links
kentcdodds Mar 5, 2021
5790e72
drop node 10 and update all deps
kentcdodds Mar 6, 2021
cd80a38
update README node version
kentcdodds Mar 6, 2021
953e95d
Update README.md (#164)
Mar 15, 2021
52ae200
docs: add iliyan-trifonov as a contributor (#165)
allcontributors[bot] Mar 15, 2021
ccc3d2f
update all deps
kentcdodds Apr 2, 2021
39ed740
update all deps
kentcdodds Apr 5, 2021
301747a
update all deps
kentcdodds Apr 13, 2021
12b8d01
improve test for exercise 5
kentcdodds Apr 13, 2021
f545d94
docs(01.html): suggest documentation script module (#169)
oscard0m Apr 18, 2021
435ce46
docs: add oscard0m as a contributor (#170)
allcontributors[bot] Apr 18, 2021
4fb958b
Improve performance of Rendering Arrays exercise (#171)
aaronccasanova Apr 19, 2021
e2b2b54
Improve performance of Rendering Arrays final (#172)
aaronccasanova Apr 19, 2021
89431e2
docs: add aaronccasanova as a contributor (#173)
allcontributors[bot] Apr 19, 2021
e811ed1
update all deps
kentcdodds Apr 20, 2021
2c8eb3a
improve instructions for key lesson
kentcdodds Apr 20, 2021
2beb94e
whooops
kentcdodds Apr 20, 2021
87f58ea
fix version stuff
kentcdodds Apr 21, 2021
7569c47
add diff script
kentcdodds Apr 29, 2021
dc26e1d
update sandbox config
kentcdodds May 12, 2021
6dfe925
update all deps
kentcdodds May 12, 2021
d9e038e
docs(exercise-01): add link with type=module examples (#178)
oscard0m May 20, 2021
b6ec5a5
Update Exercise 04 instructions (#179)
kylegach May 21, 2021
44c05a5
docs: add kylegach as a contributor (#180)
allcontributors[bot] May 21, 2021
618bf1d
docs(ex-06): add link to MDN Event.preventDefault (#183)
oscard0m May 25, 2021
2aa3a49
Edit the delete text around the unpkg script tags (#187)
antdke Jun 4, 2021
5f94b4a
docs: add antdke as a contributor (#188)
allcontributors[bot] Jun 4, 2021
af47646
update deps with npm 6
kentcdodds Jun 10, 2021
88803c7
Adds React fragment shorthand syntax (#192)
m4ttsch Jul 15, 2021
293f859
docs: add m4ttsch as a contributor for doc (#193)
allcontributors[bot] Jul 15, 2021
0e7feba
Fixed "className" typo in Exercise (#201)
Siemik Aug 26, 2021
dd6b61c
docs: add Siemik as a contributor for doc (#202)
allcontributors[bot] Aug 26, 2021
960d9c4
Docs: Improving extra credit on 7th lesson (#203)
debone Sep 5, 2021
903dd8f
docs: add debone as a contributor for doc (#206)
allcontributors[bot] Sep 5, 2021
e4a89c8
add syntax command (#205)
lifeparticle Sep 5, 2021
ab32a83
docs: add lifeparticle as a contributor for doc (#207)
allcontributors[bot] Sep 5, 2021
e386f44
improve instructions for exercise 5 (#209)
mokajima Sep 13, 2021
f3201c1
docs: add mokajima as a contributor for doc (#210)
allcontributors[bot] Sep 13, 2021
6556328
improve background in 05.md (#211)
mokajima Sep 14, 2021
60cc5a9
Improve the instructions for extra credits in 06.md (#212)
mokajima Sep 18, 2021
5265e02
Add support for node 17 (#229)
marioleed Oct 27, 2021
83bc6da
docs: add marioleed as a contributor for code (#230)
allcontributors[bot] Oct 27, 2021
3f1837e
remove validate script for v17 for now
kentcdodds Oct 27, 2021
66ab651
remove unused extension and config options
kentcdodds Oct 29, 2021
b2f9fb2
update all deps
kentcdodds Nov 6, 2021
e7eca6e
node 17 doesn't work with our deps
kentcdodds Dec 7, 2021
355d6be
change delete this line comment (#242)
octokatherine Dec 30, 2021
385415e
docs: add octokatherine as a contributor for doc (#243)
allcontributors[bot] Dec 30, 2021
e4e0f65
Node 17 isn't supported so remove from README (#238)
alexcwatt Dec 30, 2021
38c79cf
docs: add alexcwatt as a contributor for doc (#244)
allcontributors[bot] Dec 30, 2021
c2d7676
make instructions more clear (#241)
octokatherine Dec 30, 2021
9e07aab
adjust regex in test (#248)
nedredmond Feb 14, 2022
30e74d0
docs: add nedredmond as a contributor for test (#249)
allcontributors[bot] Feb 14, 2022
c23a75b
upgrade to react 18 (#257)
kentcdodds Apr 15, 2022
b30b47f
fix createRoot reference
kentcdodds Apr 25, 2022
954c4f1
update to react 18
kentcdodds Apr 27, 2022
cc36a50
update update-deps script
kentcdodds Apr 27, 2022
d47b11c
update all deps
kentcdodds Apr 27, 2022
c2ed34a
Fully automate learner setup with Gitpod (#260)
jacobparis May 5, 2022
45e52e3
This bug was fixed, no need for this warning (#261)
ozadari5 May 11, 2022
ef59d8f
docs: add ozadari5 as a contributor for doc (#262)
allcontributors[bot] May 11, 2022
3ab0ac1
Update 01.html (#264)
mattstobbs May 17, 2022
960a6a3
update react-scripts (#263)
kentcdodds May 18, 2022
9f3976e
docs(exercise-3): add links to JSX helper docs (#268)
cRAN-cg May 31, 2022
952779a
docs: add cRAN-cg as a contributor for doc (#269)
allcontributors[bot] May 31, 2022
c82ca78
update all deps
kentcdodds Jun 21, 2022
b757a1a
Update 03.md (#275)
sunnatganiev Jun 22, 2022
249fa19
docs: add sunnatganiev as a contributor for doc (#276)
allcontributors[bot] Jun 22, 2022
c0a23cf
update npm version
kentcdodds Aug 5, 2022
b2821a4
fix npm version requirement
kentcdodds Aug 19, 2022
9130e5a
force v8 for github ci
kentcdodds Aug 19, 2022
28fc98e
only v18
kentcdodds Aug 19, 2022
069aec8
check latest
kentcdodds Aug 19, 2022
833d602
hmmm
kentcdodds Aug 19, 2022
105fe2f
whoops
kentcdodds Aug 19, 2022
2bb9148
what it should be
kentcdodds Aug 19, 2022
9971c08
make Dominic the Document links clickable (#301)
jcat4 Oct 17, 2022
7532df7
docs: add jcat4 as a contributor for doc (#302)
allcontributors[bot] Oct 17, 2022
4b38748
Update 04.md (#304)
Havock94 Oct 29, 2022
1234eb7
docs: add Havock94 as a contributor for doc (#305)
allcontributors[bot] Oct 29, 2022
87a3c15
update deps
kentcdodds Nov 17, 2022
3fd1471
update setup check
kentcdodds Dec 3, 2022
b703bcb
make feedback link clickable - README.md (#314)
anjola-adeuyi Dec 29, 2022
64b7560
docs: add anjola-adeuyi as a contributor for doc (#315)
allcontributors[bot] Dec 29, 2022
375e4fa
remove className as props from Box component (#313)
ASPzoomin Dec 29, 2022
2bee259
docs: add ASPzoomin as a contributor for code (#316)
allcontributors[bot] Dec 29, 2022
895d449
fix
kentcdodds Dec 30, 2022
c98c7f2
docs: add jmurphyau as a contributor for bug (#317)
allcontributors[bot] Dec 30, 2022
0756af2
feat: add auto-shuffle checkbox and input labels to keys demo (exerci…
jgorfine-zendesk Jan 19, 2023
389757e
docs: add jgorfine-zendesk as a contributor for bug, a11y, and code (…
allcontributors[bot] Jan 19, 2023
3766a2d
Remove an extra list element (#325)
ambujsahu81 Feb 5, 2023
77e21b9
docs: add ambujsahu81 as a contributor for doc (#326)
allcontributors[bot] Feb 5, 2023
7ab4bef
fix: engine supported version (#340)
mattchannn May 14, 2023
aea8fc8
docs: add mattchannn as a contributor for code (#341)
allcontributors[bot] May 14, 2023
fef5f97
Update 06.md (#343)
jkrooncoding May 15, 2023
f9a3d0f
docs: add jkrooncoding as a contributor for doc (#344)
allcontributors[bot] May 15, 2023
011c0c4
Update 04.md (#342)
jkrooncoding May 15, 2023
ba1bf8f
>=16
kentcdodds May 30, 2023
0581c8c
📝 docs(global): updated react docs old url to new url. (#350)
creador-dev Jul 2, 2023
c5feec7
Epic react fundamentals workshop
Mr-Fred May 27, 2024
33de66b
Delete src directory
Mr-Fred Jun 14, 2024
6849030
Delete src directory
Mr-Fred Jun 14, 2024
9508dad
Delete public directory
Mr-Fred Jun 14, 2024
546380c
Delete public directory
Mr-Fred Jun 14, 2024
324ab16
Delete scripts directory
Mr-Fred Jun 14, 2024
c2c8c05
Delete scripts directory
Mr-Fred Jun 14, 2024
8d74aaf
Delete .all-contributorsrc
Mr-Fred Jun 14, 2024
af0aa30
Delete .all-contributorsrc
Mr-Fred Jun 14, 2024
7459cba
Delete .eslintignore
Mr-Fred Jun 14, 2024
f8f5799
Delete .eslintignore
Mr-Fred Jun 14, 2024
848a0a4
Delete .gitignore
Mr-Fred Jun 14, 2024
7399b6b
Delete .gitignore
Mr-Fred Jun 14, 2024
945bc55
Delete .gitattributes
Mr-Fred Jun 14, 2024
cddfe6e
Delete .gitattributes
Mr-Fred Jun 14, 2024
50c3224
Delete .gitpod.yml
Mr-Fred Jun 14, 2024
c8fd845
Delete .gitpod.yml
Mr-Fred Jun 14, 2024
5c11263
Delete CODE_OF_CONDUCT.md
Mr-Fred Jun 14, 2024
0d47b20
Delete CODE_OF_CONDUCT.md
Mr-Fred Jun 14, 2024
da6745b
Delete .npmrc
Mr-Fred Jun 14, 2024
6673297
Delete .npmrc
Mr-Fred Jun 14, 2024
64ca250
Delete .prettierignore
Mr-Fred Jun 14, 2024
ce0dd2a
Delete .prettierignore
Mr-Fred Jun 14, 2024
cc64d7b
Delete .prettierrc
Mr-Fred Jun 14, 2024
70f4020
Delete .prettierrc
Mr-Fred Jun 14, 2024
d6cbade
Delete CONTRIBUTING.md
Mr-Fred Jun 14, 2024
073b0fd
Delete CONTRIBUTING.md
Mr-Fred Jun 14, 2024
148fbe1
Delete LICENSE.md
Mr-Fred Jun 14, 2024
29fcdd8
Delete LICENSE.md
Mr-Fred Jun 14, 2024
5739458
Delete Dockerfile
Mr-Fred Jun 14, 2024
9e3463e
Delete Dockerfile
Mr-Fred Jun 14, 2024
792324a
Delete README.md
Mr-Fred Jun 14, 2024
ffd62d3
Delete README.md
Mr-Fred Jun 14, 2024
1cc6d24
Delete docker-compose.yml
Mr-Fred Jun 14, 2024
850a741
Delete docker-compose.yml
Mr-Fred Jun 14, 2024
61736f3
Delete craco.config.js
Mr-Fred Jun 14, 2024
c6cc959
Delete craco.config.js
Mr-Fred Jun 14, 2024
8b2db7f
Delete package-lock.json
Mr-Fred Jun 14, 2024
220d40a
Delete package-lock.json
Mr-Fred Jun 14, 2024
53e0278
Delete package.json
Mr-Fred Jun 14, 2024
54a6ac9
Delete package.json
Mr-Fred Jun 14, 2024
6bb76ee
Delete sandbox.config.json
Mr-Fred Jun 14, 2024
177b1c7
Delete sandbox.config.json
Mr-Fred Jun 14, 2024
813c2fd
Delete setup.js
Mr-Fred Jun 14, 2024
5629924
Delete setup.js
Mr-Fred Jun 14, 2024
2a4c8d8
Created folders for each part of the course
Mr-Fred Jun 15, 2024
7c8e869
Created folders for each part of the course
Mr-Fred Jun 15, 2024
84014f7
Exercices part 0
Mr-Fred Jun 15, 2024
6b2c56c
Exercices part 0
Mr-Fred Jun 15, 2024
7783476
Update README.md
Mr-Fred Jun 15, 2024
f5e2abf
Update README.md
Mr-Fred Jun 15, 2024
85cc591
Part 1 Course info exercises 1.1 to 1.5.
Mr-Fred Jun 16, 2024
d32a3cb
Part 1 Course info exercises 1.1 to 1.5.
Mr-Fred Jun 16, 2024
a054278
Merge branch 'fullstackopen_course' of https://github.com/Mr-Fred/rea…
Mr-Fred Jun 16, 2024
4a82a8d
Merge branch 'fullstackopen_course' of https://github.com/Mr-Fred/rea…
Mr-Fred Jun 16, 2024
4e20381
Part 1 Unicafe exercises 1.6 to 1.14.
Mr-Fred Jun 17, 2024
dfbacfc
Part 1 Unicafe exercises 1.6 to 1.14.
Mr-Fred Jun 17, 2024
a52b2a8
updated readme
Mr-Fred Jun 17, 2024
c42ddfb
updated readme
Mr-Fred Jun 17, 2024
7f9e5fd
feat: Implement feedback system for anecdotes
Mr-Fred Jun 23, 2024
e0c9aae
feat: Implement feedback system for anecdotes
Mr-Fred Jun 23, 2024
a9be4ac
Modified folder structure to avoid creating a new vite app for each e…
Mr-Fred Jun 29, 2024
c1a947e
Modified folder structure to avoid creating a new vite app for each e…
Mr-Fred Jun 29, 2024
1654dc5
feat: Initial commit - Simple React phonebook application
Mr-Fred Jun 30, 2024
1377517
feat: Initial commit - Simple React phonebook application
Mr-Fred Jun 30, 2024
7ec9359
Integrate backend dev server json-server.
Mr-Fred Jul 6, 2024
d61a690
Integrate backend dev server json-server.
Mr-Fred Jul 6, 2024
10d0ab5
Added json-server for crud operation support.
Mr-Fred Jul 13, 2024
7bc95e8
Added json-server for crud operation support.
Mr-Fred Jul 13, 2024
7b6df63
Add a component to display notification for each crud operation.
Mr-Fred Jul 14, 2024
3ed1a87
Add a component to display notification for each crud operation.
Mr-Fred Jul 14, 2024
5b87bf9
initial commit for countries exercises.
Mr-Fred Jul 20, 2024
b90b916
initial commit for countries exercises.
Mr-Fred Jul 20, 2024
4641dae
Implemented search functionality with fuzzy matching and debouncing.
Mr-Fred Jul 21, 2024
6946db0
Implemented search functionality with fuzzy matching and debouncing.
Mr-Fred Jul 21, 2024
fcc337c
implementing country list functionality
Mr-Fred Jul 21, 2024
47cab5e
implementing country list functionality
Mr-Fred Jul 21, 2024
3c2afa6
Implement Country component and functionalities to format display cou…
Mr-Fred Jul 21, 2024
713676e
Implement Country component and functionalities to format display cou…
Mr-Fred Jul 21, 2024
1031473
edit country Card
Mr-Fred Jul 23, 2024
c9cb7dc
edit country Card
Mr-Fred Jul 23, 2024
61b5b76
final commit for countries app
Mr-Fred Nov 12, 2024
d76fa85
final commit for countries app
Mr-Fred Nov 12, 2024
592612c
connecting backend and frontend
Mr-Fred Nov 13, 2024
ea513b4
connecting backend and frontend
Mr-Fred Nov 13, 2024
56bedc1
create backend for note app
Mr-Fred Nov 15, 2024
e997fcc
integrate mongoDB database to noteApp
Mr-Fred Nov 16, 2024
552c3ed
Added functionality to update data and add error handling middlware
Mr-Fred Nov 16, 2024
81326e0
undoing mistake committing .env. [beginner mistake]
Mr-Fred Nov 16, 2024
c5eb6d3
Add .env to .gitignore
Mr-Fred Nov 16, 2024
1b1ffd9
attempt to solve the issue of .env being added to commit despite addi…
Mr-Fred Nov 16, 2024
6151a83
still trying to solve the .env file being commited to repos issue
Mr-Fred Nov 16, 2024
29c952a
Commit to verify the .env issue is fixed
Mr-Fred Nov 17, 2024
77dc73e
Fullstack phonebook app with mongodb and error handling middleware an…
Mr-Fred Nov 17, 2024
1d28337
Integrate ESLint. end of part3
Mr-Fred Nov 17, 2024
d80358b
Preparing to submit
Mr-Fred Nov 17, 2024
7b357be
Part 4 exercice 4.1-4.2
Mr-Fred Nov 18, 2024
85d48c4
Part 4 Exercises 4.3.-4.7, wrote few unit tests
Mr-Fred Nov 24, 2024
dadb557
part 4-b
Mr-Fred Nov 28, 2024
d156a6e
Part 4 Exercises 4.13.-4.14.
Mr-Fred Nov 29, 2024
2f34807
Part 4c user administration
Mr-Fred Dec 1, 2024
a027a40
Part 4, Exercises 4.15.-4.23.
Mr-Fred Dec 9, 2024
99b814f
part 5b exercices 5.5 - 5.12
Mr-Fred Dec 14, 2024
b6833f5
Part 5 Playwright End to end testing
Mr-Fred Dec 21, 2024
df8c777
part 6 reducers
Mr-Fred Dec 23, 2024
7ffc487
Add notification feature and update filter reducer to use Redux Toolkit
Mr-Fred Dec 24, 2024
9baf665
Implement Redux store setup and add note management features
Mr-Fred Dec 24, 2024
f7553ce
Integrate React Query for note management and remove Redux dependencies
Mr-Fred Dec 24, 2024
5aafbdb
update
Mr-Fred Dec 25, 2024
06a1bb8
Set up Vite with React and implement react query and react contextAPI…
Mr-Fred Dec 25, 2024
3d51673
Refactor note management to use React Query for filter functionality,…
Mr-Fred Dec 25, 2024
ec7ea2c
Initialize Vite project with React, set up React routing,
Mr-Fred Dec 25, 2024
583a8ad
Add login functionality and refactor note components to use React Que…
Mr-Fred Dec 25, 2024
c29b7a9
custom hooks
Mr-Fred Dec 26, 2024
273542a
Add user management and authentication features, refactor components …
Mr-Fred Dec 29, 2024
9d61de7
Add Tailwind CSS integration, set up Redux store, and implement notif…
Mr-Fred Jan 2, 2025
e5e3b93
Add Vite configuration, Apollo Client setup, and initial components f…
Mr-Fred Jan 11, 2025
77228a2
Add GraphQL models for User, Person, Author, and Book; configure Mong…
Mr-Fred Jan 13, 2025
5bcbafb
Refactor User and Person models to use default export; add user regis…
Mr-Fred Jan 17, 2025
20c840f
Add GraphQL schemas and type definitions for Author, Book, and User; …
Mr-Fred Jan 19, 2025
4ae512b
Merge branch 'fullstackopen_course' of https://github.com/Mr-Fred/rea…
Mr-Fred Apr 13, 2025
b66e4df
feat(testing): add Playwright E2E tests and CI/CD pipeline
Jul 19, 2025
4edf721
fix(ci): Correct Docker build context in deploy workflow
Jul 19, 2025
5ed1636
Merge branch 'main' into fullstackopen_course
Jul 19, 2025
00c703a
Merge branch 'main' into fullstackopen_course
Mr-Fred Jul 19, 2025
a50884d
fix(lint): Correct ESLint configuration and dependencies
Jul 20, 2025
fda3fee
Fix: ERR_MODULE_NOT_FOUND @stylistic/eslint-plugin-js
Jul 20, 2025
cd4e358
style(tests): Correct linting errors in E2E tests
Jul 20, 2025
12e6385
fixing broken test
Mr-Fred Jul 20, 2025
47affea
feat: Implement token extraction middleware and enhance error handlin…
Mr-Fred Jul 22, 2025
2c5b546
feat: Add .dockerignore, update CI/CD pipeline, and refactor Dockerfi…
Mr-Fred Jul 22, 2025
439f123
fix: Error in github Action workflow: Cannot find module '../models/N…
Mr-Fred Jul 22, 2025
6353451
Rename note.js to Note.js
Mr-Fred Jul 22, 2025
7c6a0ff
feat: Update test script to target specific test files and enhance us…
Mr-Fred Jul 22, 2025
7b35035
fix: Update lint script to automatically fix issues and clean up unus…
Mr-Fred Jul 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Git
.git
.gitignore

# Node
node_modules
part2/notes_frontend/node_modules
part3/notes_fullstack/node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Test artifacts
part3/notes_fullstack/tests
part3/notes_fullstack/playwright-report
part3/notes_fullstack/test-results

# Fly.io config (not needed for this deployment)
part3/notes_fullstack/fly.toml

# Env files
.env
part3/notes_fullstack/.env
21 changes: 21 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
127 changes: 127 additions & 0 deletions .github/workflows/deploy_note_app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: CI/CD Pipeline

on:
pull_request:
branches:
- main
push:
branches:
- main

env:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
SERVICE_NAME: notes-app-service
REGION: us-central1
GAR_LOCATION: us-central1 # Location for Artifact Registry

jobs:
test:
name: Build and Test Suite
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

# Backend setup and tests
- name: Install backend dependencies
working-directory: ./part3/notes_fullstack
run: npm ci

- name: Lint backend code
working-directory: ./part3/notes_fullstack
run: npm run lint

- name: Run backend unit tests
working-directory: ./part3/notes_fullstack
run: npm test
env:
TEST_MONGODB_URI: ${{ secrets.TEST_MONGODB_URI }}
SECRET: ${{ secrets.SECRET }}

# Frontend setup and build
- name: Install frontend dependencies
working-directory: ./part2/notes_frontend
run: npm ci

- name: Lint frontend code
working-directory: ./part2/notes_frontend
run: npm run lint

- name: Build frontend for E2E tests
working-directory: ./part3/notes_fullstack
run: npm run build:ui

# E2E tests
- name: Install Playwright browsers
working-directory: ./part3/notes_fullstack
run: npx playwright install --with-deps

- name: Run Playwright E2E tests
working-directory: ./part3/notes_fullstack
run: npm run test:e2e
env:
TEST_MONGODB_URI: ${{ secrets.TEST_MONGODB_URI }}
SECRET: ${{ secrets.SECRET }}

- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: part3/notes_fullstack/playwright-report/
retention-days: 30

- name: Upload build artifact for deployment
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: production-build
path: part3/notes_fullstack/dist

deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Deploy to Cloud Run
needs: test
runs-on: ubuntu-24.04
permissions:
contents: 'read'
id-token: 'write' # Required for Workload Identity Federation
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: production-build
path: part3/notes_fullstack/dist

- name: Authenticate to Google Cloud
id: auth
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: ${{ secrets.GCP_WIF_PROVIDER }}
service_account: ${{ secrets.GCP_SA_EMAIL }}

- name: Configure Docker
run: gcloud auth configure-docker ${{ env.GAR_LOCATION }}-docker.pkg.dev

- name: Build and push Docker image to Artifact Registry
run: |
docker build . -f part3/notes_fullstack/Dockerfile -t ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE_NAME }}/${{ env.SERVICE_NAME }}:${{ github.sha }}
docker push ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE_NAME }}/${{ env.SERVICE_NAME }}:${{ github.sha }}

- name: Deploy image to Cloud Run
run: |
gcloud run deploy ${{ env.SERVICE_NAME }} \
--image ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE_NAME }}/${{ env.SERVICE_NAME }}:${{ github.sha }} \
--region ${{ env.REGION }} \
--allow-unauthenticated \
--set-env-vars "MONGODB_URI=${{ secrets.MONGODB_URI }},SECRET=${{ secrets.SECRET }}"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,9 @@ out/
Thumbs.db

# Misc
<<<<<<< HEAD
*.local

=======
*.local
>>>>>>> 53c7715 (fix(lint): Correct ESLint configuration and dependencies)
58 changes: 58 additions & 0 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# To learn more about how to use Nix to configure your environment
# see: https://developers.google.com/idx/guides/customize-idx-env
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-23.11"; # or "unstable"

# Use https://search.nixos.org/packages to find packages
packages = [
# pkgs.go
# pkgs.python311
# pkgs.python311Packages.pip
# pkgs.nodejs_20
# pkgs.nodePackages.nodemon
pkgs.fly
pkgs.flyctl
pkgs.vite
];

# Sets environment variables in the workspace
env = {};
idx = {
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
extensions = [
# "vscodevim.vim"
];

# Enable previews
previews = {
enable = true;
previews = {
# web = {
# # Example: run "npm run dev" with PORT set to IDX's defined port for previews,
# # and show it in IDX's web preview panel
# command = ["npm" "run" "dev"];
# manager = "web";
# env = {
# # Environment variables to set for your server
# PORT = "$PORT";
# };
# };
};
};

# Workspace lifecycle hooks
workspace = {
# Runs when a workspace is first created
onCreate = {
# Example: install JS dependencies from NPM
# npm-install = "npm install";
};
# Runs when the workspace is (re)started
onStart = {
# Example: start a background task to watch and re-build backend code
# watch-backend = "npm run watch-backend";
};
};
};
}
3 changes: 3 additions & 0 deletions .idx/integrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"gemini_api": {}
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"git.ignoreLimitWarning": true,
"IDX.aI.enableInlineCompletion": true,
"IDX.aI.enableCodebaseIndexing": true,
"postman.settings.dotenv-detection-notification-visibility": false
}
25 changes: 25 additions & 0 deletions app/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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?
../task_mgt_dashboard.html
21 changes: 21 additions & 0 deletions app/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
25 changes: 25 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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?
../task_mgt_dashboard.html
45 changes: 45 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# syntax = docker/dockerfile:1

# Adjust NODE_VERSION as desired
ARG NODE_VERSION=20.11.1
FROM node:${NODE_VERSION}-slim as base

LABEL fly_launch_runtime="Vite"

# Vite app lives here
WORKDIR /app

# Set production environment
ENV NODE_ENV="production"


# Throw-away build stage to reduce size of final image
FROM base as build

# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Copy application code
COPY . .

# Build application
RUN npm run build

# Remove development dependencies
RUN npm prune --omit=dev


# Final stage for app image
FROM nginx

# Copy built application
COPY --from=build /app/dist /usr/share/nginx/html

# Start the server by default, this can be overwritten at runtime
EXPOSE 80
CMD [ "/usr/sbin/nginx", "-g", "daemon off;" ]
Loading