Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

2023-04-25: Feedback zur Abgabe #36

Draft
wants to merge 248 commits into
base: initial
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
39a75f3
add component library
CaroleHug Jan 31, 2023
d1b33c0
add css
CaroleHug Jan 31, 2023
9d982e2
feat: Add Component library
CaroleHug Jan 31, 2023
c6e0089
add tailwind styling
CaroleHug Jan 31, 2023
b06e9b6
fix: Use tailwind styles in new app
CaroleHug Jan 31, 2023
c2b3084
add fetch-data
CaroleHug Mar 7, 2023
c7277bc
add .env file
CaroleHug Mar 7, 2023
eea188d
show first 20 mumbles
CaroleHug Mar 7, 2023
4265157
remove unused entry in env file
CaroleHug Mar 7, 2023
27c36b2
remove code from fetch-data to index
CaroleHug Mar 7, 2023
0a84df9
feat: #2 Home-Screen: Alle Posts laden und speichern (API-Call)
CaroleHug Mar 7, 2023
b210824
Added eslint, prettier, dependency-cruiser, smartive/eslint and smart…
Mar 7, 2023
6d21105
Merge branch 'main' into feature/app-8_prettier_liting
Mar 7, 2023
0e87188
Used prettier and eslint
Mar 7, 2023
3444ce4
Used eslint on qwacker
Mar 7, 2023
d5edf58
add logout button to navbar
CaroleHug Mar 7, 2023
07fb648
add automatic redirects
CaroleHug Mar 7, 2023
d13e88a
Refactored after PR.
Mar 7, 2023
133e4dd
Merge pull request #4 from smartive-education/feature/app-8_prettier_…
malib Mar 7, 2023
c3a7b57
refactor login and logout
CaroleHug Mar 7, 2023
dd17fd6
Merge remote-tracking branch 'origin/main' into feature/app-3-navbar
CaroleHug Mar 7, 2023
f64c424
fix lint and prettier
CaroleHug Mar 7, 2023
57a2096
add styling for login page
CaroleHug Mar 7, 2023
42c274e
run prettier
CaroleHug Mar 7, 2023
4665ed1
run prettier
CaroleHug Mar 7, 2023
9988fa4
feat: #3 Home-Screen: Navbar
CaroleHug Mar 7, 2023
33a508b
Merge remote-tracking branch 'origin/main' into feature/app-6-login-page
CaroleHug Mar 7, 2023
7c825e8
feat: Added src folder as parent
Mar 7, 2023
fb41338
Merge remote-tracking branch 'origin/main' into feature/app-9_create_src
Mar 9, 2023
f2ed24d
Merge pull request #7 from smartive-education/feature/app-9_create_src
malib Mar 9, 2023
8f52bee
Merge remote-tracking branch 'origin/main' into feature/app-6-login-page
CaroleHug Mar 9, 2023
88e959e
fix: Added src to tailwind content
Mar 9, 2023
cfaf4a0
Merge pull request #8 from smartive-education/feature/app-9_create_src
malib Mar 9, 2023
93afa80
Merge remote-tracking branch 'origin/main' into feature/app-6-login-page
CaroleHug Mar 9, 2023
3613272
update component library
CaroleHug Mar 9, 2023
323a455
update navbar
CaroleHug Mar 9, 2023
dafb938
feat: #6 Login-Page: Seite stylen
CaroleHug Mar 9, 2023
13527e2
update component library
CaroleHug Mar 9, 2023
77cb463
add icon to login page
CaroleHug Mar 9, 2023
4351405
add cards
CaroleHug Mar 9, 2023
7d16d2a
add responsive behaviour
CaroleHug Mar 9, 2023
05d86e1
Merge pull request #9 from smartive-education/feature/app-4-show-load…
CaroleHug Mar 10, 2023
64735dd
add user service
CaroleHug Mar 10, 2023
657077e
add like functionality
CaroleHug Mar 10, 2023
5f129af
fix: Added new storybook version
Mar 12, 2023
d2234fc
fix jwt token
CaroleHug Mar 21, 2023
819bbdf
feat: Added first commitable state
Mar 25, 2023
5e4056b
feat: Added tanStack and axios
Mar 25, 2023
997c7cf
feat: Added latest storybook
Mar 25, 2023
70dcd35
feat: Added QueryClientProvider and fixed mutation
Mar 25, 2023
50105dc
Merge pull request #11 from smartive-education/feature/app19_axios_query
CaroleHug Mar 26, 2023
8f02b66
Merge pull request #10 from smartive-education/feature/app-14_storybo…
CaroleHug Mar 26, 2023
f7d403f
fix build
CaroleHug Mar 26, 2023
dce8844
fix likeMumble
CaroleHug Mar 26, 2023
4ba32ea
move mumbleCard to seperate component
CaroleHug Mar 26, 2023
2a068bd
add delete function
CaroleHug Mar 26, 2023
ed2e946
add submit comment
CaroleHug Mar 26, 2023
c69538e
add reducer
CaroleHug Mar 26, 2023
e5380bc
move header to _app
CaroleHug Mar 26, 2023
14fd5d3
add comment
CaroleHug Mar 26, 2023
053e8d4
add comment function
CaroleHug Mar 26, 2023
6624211
fix prettier
CaroleHug Mar 26, 2023
4e3d038
feat: Added error and loading spinner
Mar 27, 2023
2ff62e6
add user data
CaroleHug Mar 27, 2023
11d0b5a
Merge remote-tracking branch 'origin/main' into feature/app12-add-users
CaroleHug Mar 28, 2023
1b40096
add detail page for mumble
CaroleHug Mar 28, 2023
9d9a090
add todo
CaroleHug Mar 28, 2023
97f723a
add margin
CaroleHug Mar 28, 2023
d2d053b
remove unused imports
CaroleHug Mar 28, 2023
9be0e43
adjust header
CaroleHug Mar 31, 2023
ef703db
refactor api calls
CaroleHug Mar 31, 2023
6e63d78
refactor api calls
CaroleHug Mar 31, 2023
d70bde0
update storybook
CaroleHug Mar 31, 2023
fa07f53
Merge branch 'feature/app12-add-users' into feature/app-20-add-detail…
CaroleHug Mar 31, 2023
b8fd2bb
fix imports
CaroleHug Mar 31, 2023
350348a
show header only if user is not logged in
CaroleHug Mar 31, 2023
6beca5e
feat: Added form to textfield and some refactorings
Mar 31, 2023
05ca70e
add logic to show likes
CaroleHug Mar 31, 2023
5f37a45
Merge remote-tracking branch 'origin/feature/app12-add-users' into fe…
Mar 31, 2023
eefd237
fix comments
CaroleHug Mar 31, 2023
7c5b485
Delete writeMumble
Mar 31, 2023
82d95d9
refactoring
CaroleHug Mar 31, 2023
08fd5ee
show comments in same card as the post
CaroleHug Mar 31, 2023
6daafb6
remove unused header content
CaroleHug Mar 31, 2023
1ff2032
Merge branch 'feature/app12-add-users' into feature/app5_added_post
Mar 31, 2023
ad365c7
add divider
CaroleHug Mar 31, 2023
42d8ae8
add images
CaroleHug Mar 31, 2023
ade5ab0
Changed error for post
Mar 31, 2023
bd23673
add new storybook
CaroleHug Mar 31, 2023
5a83134
feat: app12 enrich posts
CaroleHug Mar 31, 2023
4c38e92
Merge remote-tracking branch 'origin/main' into feature/app-20-add-de…
CaroleHug Mar 31, 2023
1e311b0
add navigate back to logo
CaroleHug Mar 31, 2023
5542407
add paddings
CaroleHug Mar 31, 2023
8a4b985
fix padding in mumbleCard
CaroleHug Mar 31, 2023
5e41d1b
fix divider if there no comment
CaroleHug Mar 31, 2023
01cbe86
add classes to image
CaroleHug Mar 31, 2023
47d812a
Merge remote-tracking branch 'origin/main' into feature/app5_added_post
Mar 31, 2023
b658139
fix size of card
CaroleHug Mar 31, 2023
d24c632
fix lint
CaroleHug Mar 31, 2023
2750dd7
update comments automatically
CaroleHug Apr 1, 2023
6048989
add margin bottom
CaroleHug Apr 1, 2023
7c88ea7
use Image instead of img
CaroleHug Apr 1, 2023
2fd87e8
fix: Fixed by removing for header profile and card the specific measu…
Apr 2, 2023
82b2851
Merge pull request #13 from smartive-education/feature/app5_added_post
malib Apr 2, 2023
df458ff
Merge remote-tracking branch 'origin/main' into feature/app-20-add-de…
CaroleHug Apr 2, 2023
7053410
feat: #20 Detailpage für Post hinzufügen
CaroleHug Apr 3, 2023
da459c1
add load more behaviour
CaroleHug Apr 3, 2023
7d6f1c2
add creator infos to reloaded mumbles
CaroleHug Apr 4, 2023
bdbfeed
move mumblelist to seperate component
CaroleHug Apr 4, 2023
b71c61a
add infinite scrolling
CaroleHug Apr 4, 2023
ef13a18
remove unused change
CaroleHug Apr 4, 2023
fefca29
remove deprecated function
CaroleHug Apr 4, 2023
978e02e
feat: Added nextLink component to profile header and user profile com…
Apr 6, 2023
83308f2
Merge branch 'feature/app-17-load-more-posts' into feature/app21_user…
Apr 6, 2023
f29cfcf
Merge pull request #15 from smartive-education/feature/app-17-load-mo…
CaroleHug Apr 7, 2023
5dd40d2
add copy function
CaroleHug Apr 7, 2023
1eb2121
fix size
CaroleHug Apr 7, 2023
eb719df
add background color
CaroleHug Apr 7, 2023
03fbf04
fix margin
CaroleHug Apr 7, 2023
696ee57
fix margin
CaroleHug Apr 7, 2023
1b4c3f5
round border
CaroleHug Apr 7, 2023
288ed90
feat: First draft with userprofile
Apr 8, 2023
f383ac1
Merge pull request #16 from smartive-education/feature/app-13-copy-fu…
CaroleHug Apr 8, 2023
3969614
fix: fix image size
CaroleHug Apr 8, 2023
d71a6b8
fix build
CaroleHug Apr 8, 2023
5eef756
fix build
CaroleHug Apr 8, 2023
3b61ad6
feat: Refactored css. Background pic, profile pic and tab are in the …
Apr 9, 2023
6c78f89
add mumble text content component
CaroleHug Apr 10, 2023
cd3f1df
add hashtags
CaroleHug Apr 10, 2023
408b97e
add link to profile
CaroleHug Apr 10, 2023
9020163
feat: Added modal file upload
Apr 10, 2023
108cd9c
add _document file
CaroleHug Apr 10, 2023
90973dc
add different font size for mobile devices
CaroleHug Apr 10, 2023
d586acf
refactor description text
CaroleHug Apr 10, 2023
18c1951
add mobile and desktop view
CaroleHug Apr 11, 2023
4fc0026
fix change of mobile and desktop view
CaroleHug Apr 11, 2023
4372655
Merge pull request #18 from smartive-education/bugfix/fix-build-task-chu
CaroleHug Apr 12, 2023
0179573
fix mobile and desktopview
CaroleHug Apr 12, 2023
4781167
Merge remote-tracking branch 'origin/main' into feature/app21_user_pr…
Apr 13, 2023
71d1504
feat: Added css to profile
Apr 13, 2023
7f1eabc
feat: Added fetch user by id
Apr 13, 2023
ac13b1a
feat: Fixed inifiniteScroll with correct data
Apr 15, 2023
a15c90c
feat: Rearranged reducers to on file. Added file upload only happy path.
Apr 16, 2023
5f867a7
fix: Rearranged file upload with upload reducer. Added disabling to b…
Apr 16, 2023
5d3c213
fix hide buttons in mobile view
CaroleHug Apr 17, 2023
5066357
use new buttons for mobile version
CaroleHug Apr 17, 2023
cf03497
Merge remote-tracking branch 'origin/main' into feature/app-31-mobile…
CaroleHug Apr 17, 2023
069c577
fix merge
CaroleHug Apr 17, 2023
fae93d6
fix paddings
CaroleHug Apr 17, 2023
6a09123
fix text colors
CaroleHug Apr 17, 2023
b59061b
Merge remote-tracking branch 'origin/main' into feature/app-30-add-ha…
CaroleHug Apr 17, 2023
710c7b7
add constant
CaroleHug Apr 17, 2023
59ff35b
fix: Added error message to write card, fixed error in file-upload of…
Apr 17, 2023
0e1fa01
fix: Refactored mumble list reducer.
Apr 17, 2023
2c8aeb5
Merge pull request #19 from smartive-education/feature/app-30-add-has…
CaroleHug Apr 17, 2023
371436e
fix build
CaroleHug Apr 17, 2023
4c8f7b1
fix build
CaroleHug Apr 17, 2023
eb995e0
fix build
CaroleHug Apr 17, 2023
15e2d0b
Merge pull request #23 from smartive-education/fix-build-chu
CaroleHug Apr 17, 2023
e7e305c
disable lint next line
CaroleHug Apr 17, 2023
9d9404c
Merge remote-tracking branch 'origin/main' into feature/app-31-mobile…
CaroleHug Apr 17, 2023
ca53ab2
fix: Removed if-else for session from header
Apr 17, 2023
1f96622
fix: deleted likedList, added check and refactored after review
Apr 17, 2023
f7b4d60
feat: app 31 fix mobile View
CaroleHug Apr 17, 2023
bcb00b8
fix spacing
CaroleHug Apr 17, 2023
ce8f93a
fix spacing
CaroleHug Apr 17, 2023
088a69f
use new interactive button version
CaroleHug Apr 17, 2023
b250b0c
Merge remote-tracking branch 'origin/main' into feature/app21_user_pr…
Apr 17, 2023
e3afd87
fix: Refactored after merge of main branch
Apr 17, 2023
6abeb3f
fix: Refactored after review
Apr 17, 2023
0cf5460
Merge pull request #20 from smartive-education/feature/app21_user_pro…
malib Apr 17, 2023
9563aba
Merge remote-tracking branch 'origin/main' into feature/app-31-mobile…
CaroleHug Apr 17, 2023
1db6b96
fix: Refactored after review for write card
Apr 17, 2023
ca98746
fix margins
CaroleHug Apr 17, 2023
e322b01
fix: Fixed imports
Apr 17, 2023
c91008a
fix build
CaroleHug Apr 17, 2023
9af1425
Merge pull request #24 from smartive-education/feature/app-31-mobile-…
CaroleHug Apr 17, 2023
c0361ab
fix: Further refactorings after review
Apr 17, 2023
d0ea92a
Merge remote-tracking branch 'origin/main' into feature/app-32_write_…
Apr 17, 2023
4b79698
fix: Refactored after merge from main
Apr 17, 2023
19630f4
fix: Moved reducer from mumble/id to state folder
Apr 18, 2023
bf2cbfe
fix: Fixed failed build, mobile view for index page
Apr 18, 2023
0d0e676
fix: Added current user boolean to hide tabs my mumbles and my likes …
Apr 18, 2023
e8ef611
Merge pull request #22 from smartive-education/feature/app-32_write_card
malib Apr 18, 2023
cd2b7d3
fix icon size
CaroleHug Apr 18, 2023
8e4cc32
Merge remote-tracking branch 'origin/main' into feature/app-31-mobile…
CaroleHug Apr 18, 2023
c42c5ef
fix icon size
CaroleHug Apr 18, 2023
e488838
fix build
CaroleHug Apr 18, 2023
cd0788c
fix: Added default avatar image
Apr 18, 2023
70fe8c0
Merge pull request #25 from smartive-education/feature/app-31-mobile-…
CaroleHug Apr 18, 2023
5f8727f
Merge remote-tracking branch 'origin/main' into feature/app34_default…
Apr 18, 2023
76c21c6
fix: Moved Profile header to the left
Apr 18, 2023
1bd480c
fix: Added only icon shown for button on mobile view
Apr 18, 2023
3f0919e
fix: Added isProfileIndented for MumbleCard.
Apr 18, 2023
4622d38
fix: router and loading
Apr 18, 2023
645151d
add middleware
CaroleHug Apr 19, 2023
79a6633
add pwa
CaroleHug Apr 22, 2023
50bc2f8
remove commented out text
CaroleHug Apr 22, 2023
ab408a5
fix: Added next image
Apr 23, 2023
54a14ca
fix: Added words-break to text
Apr 23, 2023
aa0369b
fix: Cleaned user profile component
Apr 23, 2023
508b4f3
add pwa
CaroleHug Apr 23, 2023
5dd5e35
remove offline file
CaroleHug Apr 23, 2023
bc05e95
fix: Fixed profile header in mumble-id
Apr 23, 2023
91978fc
app-26 add pwa
CaroleHug Apr 23, 2023
418329a
fix text for copy function
CaroleHug Apr 23, 2023
1ffe69a
fix mobile view
CaroleHug Apr 23, 2023
08350bb
app-45 Copy-Function: "Link copied" anzeigen nach kopieren
CaroleHug Apr 23, 2023
7af8234
fix: Added file upload to comment
Apr 24, 2023
75c2c1c
Merge remote-tracking branch 'origin/main' into feature/app-25-middle…
CaroleHug Apr 24, 2023
fa3eb9d
fix middleware
CaroleHug Apr 24, 2023
58080a7
fix: Added upload of new comments
Apr 24, 2023
bea86bd
fix: Rearranged if check, otherwise not everything is deleted
Apr 24, 2023
31c3226
remove accessToken check
CaroleHug Apr 24, 2023
790190d
fix pwa config in next config
CaroleHug Apr 24, 2023
28bb224
Merge remote-tracking branch 'origin/main' into feature/app34_default…
Apr 24, 2023
5e0011d
Merge pull request #26 from smartive-education/feature/app34_default_…
malib Apr 24, 2023
a6d362e
add readme
CaroleHug Apr 24, 2023
a808b95
refactoring
CaroleHug Apr 24, 2023
f5bbaf8
Merge remote-tracking branch 'origin/main' into feature/app-25-middle…
CaroleHug Apr 24, 2023
cec9a8c
Merge remote-tracking branch 'origin/main' into app45_comments_file_u…
Apr 24, 2023
8c6d92f
Feature/app 25 Add Middleware
CaroleHug Apr 24, 2023
acb0227
Merge remote-tracking branch 'origin/main' into feature/app-31-mobile…
CaroleHug Apr 24, 2023
ac2ae39
fix mobile view
CaroleHug Apr 24, 2023
216906e
fix image size
CaroleHug Apr 24, 2023
7d0ad0c
fix lint
CaroleHug Apr 24, 2023
aa0fca1
fix: Fixed forgotten comma
Apr 24, 2023
ea983a6
Merge remote-tracking branch 'origin/main' into app45_comments_file_u…
Apr 24, 2023
1028623
fix: newest version of storybook
Apr 24, 2023
29f1050
feat: Additional read me information
Apr 25, 2023
0a5b854
feat: Additional read me information
Apr 25, 2023
d3630c0
feat: Corrected read me information
Apr 25, 2023
48e2e5c
feat: added vercel to read me
Apr 25, 2023
cfb1d74
feat: Refactored after PR. Added loading spinner after comment is posted
Apr 25, 2023
6e78127
Merge pull request #32 from smartive-education/app45_comments_file_up…
malib Apr 25, 2023
cdb3807
Merge remote-tracking branch 'origin/main' into feature/app-31-mobile…
CaroleHug Apr 25, 2023
3cffb99
fix mobile view
CaroleHug Apr 25, 2023
eecc4cb
Feature/app 31 mobile view
CaroleHug Apr 25, 2023
f648a8b
add label for comments
CaroleHug Apr 25, 2023
83d9b69
#23 Comment als Link oder als Label hinzufügen.
CaroleHug Apr 25, 2023
6ee9b9b
feature/app-37 Add Readme
CaroleHug Apr 25, 2023
d2b4eaf
feat: Expanded ReadMe
Apr 25, 2023
140ba22
Merge branch 'main' into feature/app-46-readme
Apr 25, 2023
1ed1892
feat: Expanded ReadMe again
Apr 25, 2023
5c709eb
fix: Added new storybook
Apr 25, 2023
07c6daa
fix: Added new storybook
CaroleHug Apr 25, 2023
102ee9e
fix: Completed ReadMe
Apr 25, 2023
1e30c9e
Merge pull request #35 from smartive-education/feature/app-46-readme
malib Apr 25, 2023
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
435 changes: 435 additions & 0 deletions .dependency-cruiser.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
NEXT_PUBLIC_QWACKER_API_URL=[insert URL of Qwacker API]

# Authentication
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=[insert nextauth secret]

ZITADEL_ISSUER=[insert zitadel issuer URL]
ZITADEL_CLIENT_ID=[insert zitadel client id]
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore artifacts:
dist
.eslintrc.json
.next
.iml
.idea
node_modules
6 changes: 5 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "next/core-web-vitals"
"extends": [
"@smartive/eslint-config/react",
"next/core-web-vitals",
"prettier"
]
}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

**/public/workbox-*.js
**/public/workbox-*.js.map
**/public/sw.js
**/public/sw.js.map
**/public/fallback-*.js

# dependencies
/node_modules
/.pnp
Expand Down Expand Up @@ -34,3 +40,7 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

.npmrc
.iml
.idea
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore artifacts:
dist
.eslintrc.json
.next
.iml
.idea
node_modules
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@smartive/prettier-config"
170 changes: 155 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,174 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# CAS FEE ADV Application: Team Hello World

## Getting Started
This is a repository for the CAS FEE ADV application part at [Ostschweizer Fachhochschule](https://www.ost.ch/de/weiterbildung/weiterbildungsangebot/informatik/software-engineering-testing/cas-frontend-engineering-advanced).
The main goal of the CAS is to rebuild a Twitter clone called Mumble by applying all the tools and knowledge learned in the lectures to create
an application from the beginning to the end.

First, run the development server:
## Table of Content

- [General Info](#general-info)
- [Installation Guide](#installation-guide)
- [Scripts](#scripts)
- [PWA](#pwa)
- [Deploy on Vercel](#deploy-on-vercel)
- [Architecture and Strategies](#architecture-and-strategies)
- [Project History and Status](#project-history-and-status)
- [Improvements for next project](#improvements-for-next-project)
- [Authors](#authors)

## General Info

This application is the second part of the CAS based on [NextJS](https://nextjs.org/) with the component library [Helloworld](https://smartive-education.github.io/design-system-component-library-helloworld/?path=/story/design-tokens-branding-app-icon--page) from the first part.

### Live Demo

You find the deployed application [here](https://app-helloworld-1.vercel.app/).

## Installation Guide

Instructions on how to set up and install the project.

### Clone this repo
```bash
git clone https://github.com/smartive-education/app-helloworld.git
```

### Authenticating GitHub Registry

To install the UI component library package you need a personal GitHub Access Token.

- Create a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
- Create a new `.npmrc` file in the root of your repository
- Add the key and the declaration of the owner to your project. Replace TOKEN with your access token.

```console
@smartive-education:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=TOKEN
```

To find more detailed information see [Working with the npm registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry).

### Install the dependencies
Then, install the dependencies:
```bash
npm ci
```

### Create Environment Variables
Insert te missing content into the .env file in the root.
```console
# Qwacker backend
NEXT_PUBLIC_QWACKER_API_URL=[insert URL of Qwacker API]

# Authentication
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=[insert nextauth secret]

ZITADEL_ISSUER=[insert zitadel issuer URL]
ZITADEL_CLIENT_ID=[insert zitadel client id]
```

### Register a user

To use the application the user has to register at [Zitadel](https://zitadel.cloud/).

### Start the developement server
Now, you can run the development server:
```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
### Build and start the application

```bash
npm run build

npm run start
```
## Scripts

### ESLint

ESLint is configured to check:
- @smartive/prettier-config

```console
npm run lint
npm run lint:fix
```

### Prettier

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
Prettier configuration:

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
- @smartive/prettier-config

## Learn More
```console
npm run prettier
npm run prettier:check
```

### Dependency cruiser

To learn more about Next.js, take a look at the following resources:
```console
npm run depcruise
```

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
## PWA

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
The application uses the default settings of next-pwa lib.

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
To deploy the NextJS application the [Vercel Platform](https://vercel.com/new?filter=next.js) is used.

## Architecture and Strategies

Besides the achievement of the MVP, we decided on some architectural and features along the way during development.

### Architecture

The decisions:
- Each member of the project decides which knowledge she or he wants to acquire during thw development of the app
- Implemented rest calls to [qwacker API](https://qwacker-api-http-prod-4cxdci3drq-oa.a.run.app/rest/#/) with [Axios](https://axios-http.com/)
- Used [TanStack Query](https://tanstack.com/query/latest) for fetch. Only for the mutation of data
- Here only the mutation of the write card is build with TanStack Query and the other post in the comments detail is with Axios fetch. This was on purpose mention before.
- Every page or component which needs a state has its own hooks
- The [useReducer](https://react.dev/reference/react/useReducer) was preferred, even it has only one action. The decision is made for the future development
- Emphasis was placed on the mobile & desktop view
- NextJS [Middleware](https://nextjs.org/docs/advanced-features/middleware) is used to redirect to certain page, when the response is not as excepted or session is expired
- Disabled button is used if the click generates a asynchronous rest post call

### Rendering Strategies

#### Static Site Generation

Login page.

#### Server-Side Rendering (SSR)

Main page with timeline, profile page and detail page, when redirected to the page.

#### CLient-Side Rendering

Timeline for the automated scrolling and for a new created post. The redirection to the profile page over the navbar.

## Project History and Status

Our projects follow the conventions of the [Semantic Versioning 2.0.0](https://semver.org/). The tickets are tracked with [Trello](https://trello.com/b/f3ETlXfM/app).

## Improvements for next project

- The error handling for api calls has to be implemented
- Clean up tailwind classes
- Add reload button for new mumbles
- Add unit and integration tests
- Refactor some componenets in storybook

## Authors

[Mehmet Ali Bekooglu](https://github.com/malib)

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
[Carole Hug](https://github.com/CaroleHug)
15 changes: 0 additions & 15 deletions components/header.tsx

This file was deleted.

26 changes: 21 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
const withPWA = require('next-pwa')({
dest: 'public',
disable: process.env.NODE_ENV === 'development',
});

module.exports = withPWA({
reactStrictMode: true,
swcMinify: true,
}

module.exports = nextConfig
images: {
remotePatterns: [
{ protocol: 'https', hostname: 'cas-fee-advanced-ocvdad.zitadel.cloud' },
{
protocol: 'https',
hostname: 'storage.googleapis.com',
pathname: '/qwacker-api-prod-data/**',
},
{
protocol: 'https',
hostname: 'picsum.photos',
},
],
},
});
Loading