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

🚀 V2 Going Full Stack #412

Merged
merged 261 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 224 commits
Commits
Show all changes
261 commits
Select commit Hold shift + click to select a range
2230a0e
feat: TS Rest for backend api
ivan-dalmet Jul 24, 2023
934206d
feat: Use Next Router
ivan-dalmet Sep 7, 2023
c88db4d
fix: Upgrade storybook
ivan-dalmet Sep 14, 2023
051cc49
wip: trpc next-auth
ivan-dalmet Sep 15, 2023
bf76c56
wip: Remove next-auth
ivan-dalmet Sep 18, 2023
f13ffe0
wip open api
yoannfleurydev Sep 19, 2023
f396e65
fix: Add secure true for the auth cookie
ivan-dalmet Sep 20, 2023
535c313
fix: Clean up open api
ivan-dalmet Sep 20, 2023
328d3a6
fix: Add activate page and add all rest endpoints
ivan-dalmet Sep 20, 2023
e2b051e
fix: Logout
ivan-dalmet Sep 20, 2023
c2a2be5
fix: warnings
ivan-dalmet Sep 20, 2023
ca9dd31
fix: Translations
ivan-dalmet Sep 21, 2023
c665280
fix: Update next & prisma
ivan-dalmet Sep 21, 2023
8b41bed
fix: Remove buggy Cypress
ivan-dalmet Sep 21, 2023
2ee0d37
fix: Upgrade deps
ivan-dalmet Sep 21, 2023
0c9b1b1
fix: node version 18+
ivan-dalmet Sep 21, 2023
c3f7402
fix: ci
ivan-dalmet Sep 21, 2023
7b9a935
fix: Use node 18
ivan-dalmet Sep 21, 2023
d73cb81
fix: Prettier
ivan-dalmet Sep 21, 2023
1c1e8af
feat: Basic email setup
ivan-dalmet Sep 21, 2023
f7adfb6
wip: Email & translations
ivan-dalmet Sep 21, 2023
3ef2473
fix: Rollback chakra ui for select style issue
ivan-dalmet Sep 21, 2023
d7dcdaa
wip: Emails
ivan-dalmet Sep 21, 2023
e70a779
feat: use postgres
yoannfleurydev Sep 22, 2023
848590a
feat: Emails
ivan-dalmet Sep 22, 2023
1de5060
feat: builds and openapi
yoannfleurydev Sep 22, 2023
cdad8ef
fix: Rollback swagger ui package
ivan-dalmet Sep 22, 2023
76f4264
fix: Remove open api script
ivan-dalmet Sep 22, 2023
8b88ab9
fix: Readme
ivan-dalmet Sep 22, 2023
681c16e
fix: Missing translations
ivan-dalmet Sep 22, 2023
c35e852
wip: Dev hint
ivan-dalmet Sep 22, 2023
8201eaf
fix: Sort users by id
ivan-dalmet Sep 22, 2023
29f62bf
feat: move build-info.json
yoannfleurydev Sep 22, 2023
b978134
fix: Remove "coucou" from @yoannfleurydev
ivan-dalmet Sep 25, 2023
0da5b33
fix: Auth cookie in dev for safari
ivan-dalmet Sep 25, 2023
8b7bf01
fix: Register / Reset password feedback design
ivan-dalmet Sep 25, 2023
be73792
feat: pnpm now the default package manager for Start UI
yoannfleurydev Sep 25, 2023
55fd688
Feat/fullstack playwright (#411)
DecampsRenan Sep 26, 2023
1ba870a
fix: Sonar issues
ivan-dalmet Sep 26, 2023
077847b
feat: Improve verification token security
ivan-dalmet Sep 26, 2023
f9acf30
fix: Auth
ivan-dalmet Sep 27, 2023
824ca75
fix: trpc procedure chaining
ivan-dalmet Sep 28, 2023
f0beae0
feat: new open api adapter
ivan-dalmet Sep 28, 2023
d306ee3
fix: Remove old redirect
ivan-dalmet Sep 28, 2023
a48c016
fix: Update trpc
ivan-dalmet Sep 28, 2023
e25fc22
feat: improve env var management
yoannfleurydev Sep 29, 2023
393147e
fix: Add eslint rule to prevent process.env usage
ivan-dalmet Sep 29, 2023
2c4891e
feat: loggers
yoannfleurydev Sep 29, 2023
e88f93b
feat: extended trpc error for better prisma error management
yoannfleurydev Sep 29, 2023
dcd586a
fix: Cleanup logger
ivan-dalmet Oct 2, 2023
09efc23
fix: Conflict errors in front
ivan-dalmet Oct 2, 2023
f26791d
fix: Add some logs on auth route
ivan-dalmet Oct 2, 2023
86c72f2
fix: Typo
ivan-dalmet Oct 3, 2023
10f193f
fix: Emails buttons style
ivan-dalmet Oct 3, 2023
2f25f26
feat: Improve logger
ivan-dalmet Oct 3, 2023
e68da02
feat: latest logs for auth
yoannfleurydev Oct 3, 2023
42fb07d
feat: type not used anymore
yoannfleurydev Oct 3, 2023
6d9b4b3
feat: add openapi and logger for account
yoannfleurydev Oct 3, 2023
571d850
fix: using correct variable for CI
yoannfleurydev Oct 3, 2023
e3298e6
feat: add loggers for repositories
yoannfleurydev Oct 3, 2023
ad570db
fix: Move ExtendedTRPCError from db to api/errors
ivan-dalmet Oct 3, 2023
4692141
fix: Remove unused type
ivan-dalmet Oct 3, 2023
148301e
feat: Add verification for yarn / npm version with please-use-pnpm
ivan-dalmet Oct 3, 2023
c0dc63b
feat: Bump package.json version 2.0.0
ivan-dalmet Oct 3, 2023
d370645
fix: Rollback npm/yarn version check (issue with playwright)
ivan-dalmet Oct 3, 2023
dec977c
fix: Upgrade Swagger UI
ivan-dalmet Oct 3, 2023
40f7ea9
feat: Add logs for users
ivan-dalmet Oct 3, 2023
07439cb
fix: Conflict name in Repository form
ivan-dalmet Oct 3, 2023
cd51ff8
fix: swagger build (don't upgrade to >=5 at the moment)
yoannfleurydev Oct 4, 2023
7266186
feat: basic pwa setup for lighthouse to be happy
yoannfleurydev Oct 4, 2023
328427f
fix: Archi server
ivan-dalmet Oct 4, 2023
07344be
fix: error if build info does not exist
yoannfleurydev Oct 4, 2023
e0e52a7
feat: enable pwa only on build
yoannfleurydev Oct 4, 2023
80ce9d1
refactor: remove old serve static config
yoannfleurydev Oct 4, 2023
6402dcd
feat: use vercel url by default for public base url
yoannfleurydev Oct 4, 2023
debb036
fix: Remove prisma query logs in debug
ivan-dalmet Oct 5, 2023
1616c49
feat: update t3 env validator
yoannfleurydev Oct 5, 2023
fe16e49
fix: Extract tRPC provider from Providers
ivan-dalmet Oct 5, 2023
ccd8ea1
feat: Docker image name and port env var
ivan-dalmet Oct 5, 2023
ecaf50e
fix: Env Dev Hint zindex issue
ivan-dalmet Oct 6, 2023
01144c3
fix: Set debug log level by default in dev
ivan-dalmet Oct 6, 2023
5cd2c74
fix: tRPC provider order issue
ivan-dalmet Oct 6, 2023
b8a0ebd
fix: Smtp example env var
ivan-dalmet Oct 6, 2023
da53758
fix: typo
ivan-dalmet Oct 6, 2023
f983022
feat: code auth flow
yoannfleurydev Oct 7, 2023
a22d5f2
feat: remove password related code and transform is demo env var
yoannfleurydev Oct 9, 2023
c565a85
feat: Validation retry delay
ivan-dalmet Oct 9, 2023
afb0eca
feat: add demo and dev log in hints
yoannfleurydev Oct 9, 2023
7c7c02f
fix: Add theme for pin input and improve FieldPinInput
ivan-dalmet Oct 9, 2023
4bf02e0
feat: register flow (will need a specific mutation to verify the email)
yoannfleurydev Oct 9, 2023
bae4d43
refactor: use hook
yoannfleurydev Oct 9, 2023
16736f9
fix: Improve UX for auth flow
ivan-dalmet Oct 10, 2023
53519f4
fix: Remove unused import
ivan-dalmet Oct 10, 2023
dc65163
fix: Allows 0 delay for the first 3 retry
ivan-dalmet Oct 10, 2023
e58aa06
fix: Translation
ivan-dalmet Oct 10, 2023
561b083
feat: Auth emails
ivan-dalmet Oct 10, 2023
1817d65
feat: fusion activated to accountStatus
yoannfleurydev Oct 10, 2023
1d464e9
feat: add email to verification token
yoannfleurydev Oct 10, 2023
6e78ccf
feat: Add email address change template
ivan-dalmet Oct 10, 2023
b4ac390
wip: Change email flow
ivan-dalmet Oct 10, 2023
c283739
fix: check auth and guard issues
ivan-dalmet Oct 10, 2023
189c304
feat: register flow
yoannfleurydev Oct 10, 2023
47f077f
wip: Email change flow
ivan-dalmet Oct 10, 2023
6b7eec5
feat: Update email flow
ivan-dalmet Oct 10, 2023
59b3242
fix: Public guard issue
ivan-dalmet Oct 10, 2023
5aadd26
feat: Login redirect
ivan-dalmet Oct 10, 2023
9cad90f
fix: Tests
ivan-dalmet Oct 10, 2023
54e8b87
tests: Add registers tests
ivan-dalmet Oct 11, 2023
fd314f8
tests: Improve auth tests
ivan-dalmet Oct 11, 2023
4c7d1f4
tests: Use translations in tests
ivan-dalmet Oct 11, 2023
c8fbea3
feat: Translations
ivan-dalmet Oct 11, 2023
4d84ac9
fix: Minor sonar issues
ivan-dalmet Oct 11, 2023
6cb3d32
fix: Allows login in demo mode
ivan-dalmet Oct 11, 2023
f95851f
fix: Guard authenticated issue
ivan-dalmet Oct 11, 2023
4b4dc34
fix: Disable smart tanstack query network on dev or test
ivan-dalmet Oct 11, 2023
a2a9ec5
fix: Improve layout folder organisation
ivan-dalmet Oct 11, 2023
264ae6c
fix: Improve auth guards
ivan-dalmet Oct 11, 2023
7c39767
feat: improve logs
yoannfleurydev Oct 11, 2023
8e0955a
feat: improve prisma seeds
yoannfleurydev Oct 11, 2023
1fea330
fix: Rename "admin" menu to "management"
ivan-dalmet Oct 11, 2023
7b47fe2
fix: Move api documentation in account menu
ivan-dalmet Oct 11, 2023
7961b1c
wip: app/admin split
ivan-dalmet Oct 11, 2023
7c582ec
fix: Dark mode contrasts
ivan-dalmet Oct 12, 2023
2d2f2e9
feat: Refact admin layout / layout page
ivan-dalmet Oct 12, 2023
97156e8
feat: AppLayoutPage
ivan-dalmet Oct 12, 2023
b2efcdd
fix: Move home and dashboard in their own directory
ivan-dalmet Oct 12, 2023
1bf023a
feat: Add public layouts
ivan-dalmet Oct 12, 2023
d5692f5
fix: Improve app nav
ivan-dalmet Oct 12, 2023
0e1c6b3
feat: Add logout
ivan-dalmet Oct 12, 2023
9c3ec48
fix: Container size
ivan-dalmet Oct 12, 2023
cf050d5
feat: Improve app account layout
ivan-dalmet Oct 12, 2023
7ed7e70
fix: Dark mode navbars
ivan-dalmet Oct 12, 2023
9438c69
feat: improve Select
yoannfleurydev Oct 13, 2023
2bf18ef
feat: Allows multiple roles
ivan-dalmet Oct 13, 2023
f45a2f2
fix: seed emails
ivan-dalmet Oct 13, 2023
8b39e8d
fix: Roles
ivan-dalmet Oct 13, 2023
17dc358
fix: Rename role to authorizations
ivan-dalmet Oct 13, 2023
ae748f0
fix: better protected procedure
ivan-dalmet Oct 13, 2023
97e964d
fix: Authorizations
ivan-dalmet Oct 13, 2023
cde8871
fix: Translations
ivan-dalmet Oct 16, 2023
fef5be6
fix: Improve login ux
ivan-dalmet Oct 16, 2023
1cc2260
fix: Factorise code validation success
ivan-dalmet Oct 16, 2023
3dd4df5
fix: Tests
ivan-dalmet Oct 16, 2023
87da4d2
fix: Translations
ivan-dalmet Oct 16, 2023
147e395
feat: Use load more instead of pagination
ivan-dalmet Oct 16, 2023
00f246f
feat: Add search on lists
ivan-dalmet Oct 16, 2023
aebf27a
feat: Add app page for repositories
ivan-dalmet Oct 16, 2023
eaa10dd
fix: Cursor type
ivan-dalmet Oct 16, 2023
cc26ee6
feat: Add admin link in app account
ivan-dalmet Oct 16, 2023
512668c
fix: Wording of sign in button
ivan-dalmet Oct 16, 2023
e90616d
fix: Admin badge, replaced with tags
ivan-dalmet Oct 16, 2023
44956b2
fix: Move trpc types in lib
ivan-dalmet Oct 16, 2023
b40dc86
fix: Css issue
ivan-dalmet Oct 16, 2023
d2ca2ff
fix: Open Admin in new tab
ivan-dalmet Oct 16, 2023
5c3fb76
fix: Show admin link only to admin users
ivan-dalmet Oct 17, 2023
c71eeef
fix: protectedProcedure authorizations
ivan-dalmet Oct 17, 2023
c296f02
fix: GuardAuthenticated
ivan-dalmet Oct 17, 2023
1ecf699
fix: typo
ivan-dalmet Oct 17, 2023
a7fcd98
fix: translation typo
ivan-dalmet Oct 17, 2023
d9cecbf
feat: Upgrade dependencies
ivan-dalmet Oct 17, 2023
12c82ef
fix: Remove unused translation file
ivan-dalmet Oct 17, 2023
a08e09f
fix: Rename e2e login utils to loginApp
ivan-dalmet Oct 17, 2023
d69adf6
feat: Add SheetModal component and use it in ConfirmModal
ivan-dalmet Oct 17, 2023
c4e4984
fix: Not found email link
ivan-dalmet Oct 17, 2023
3cb5f67
fix: Loading login button style
ivan-dalmet Oct 18, 2023
636bea9
fix: iOS safe spaces
ivan-dalmet Oct 18, 2023
2047a6b
fix: Add certificates in gitignore
ivan-dalmet Oct 18, 2023
17f244d
feat: replace swagger with stoplight
yoannfleurydev Oct 19, 2023
930ce1e
fix: internal server error when jwt is not well formatted
yoannfleurydev Oct 19, 2023
4429028
feat: update nextjs
yoannfleurydev Oct 19, 2023
bdf4c01
feat: Navigation loading indicator
ivan-dalmet Oct 19, 2023
8f1a438
fix: Improve feedback loading waiting for navigation
ivan-dalmet Oct 19, 2023
e18c495
fix: Hash verification code in database
ivan-dalmet Oct 20, 2023
57ef811
fix: Set default list size to 20
ivan-dalmet Oct 20, 2023
142bcc3
fix: Send readable code in email
ivan-dalmet Oct 23, 2023
be0a5cb
fix: Update Readme
ivan-dalmet Oct 23, 2023
25bac11
fix: PWA less agressive caching
ivan-dalmet Oct 23, 2023
6980d5a
feat: Allows nodejs 20
ivan-dalmet Oct 23, 2023
5afd530
feat: Upgrade storybook
ivan-dalmet Oct 23, 2023
222d15f
feat: Upgrade dependencies
ivan-dalmet Oct 23, 2023
b503d94
test: Add some tests
ivan-dalmet Oct 24, 2023
6ebf289
feat: Improve global UI/UX
ivan-dalmet Oct 30, 2023
d3b16a5
fix: Alignment issue
ivan-dalmet Oct 30, 2023
056d9ea
fix: Nav size
ivan-dalmet Oct 30, 2023
757ea25
fix: Heading size for create pages
ivan-dalmet Oct 30, 2023
b78baf3
fix: Add subtle shadow on buttons
ivan-dalmet Oct 30, 2023
cf84f51
fix: Improve searchinput
ivan-dalmet Oct 30, 2023
72a482c
fix: Wording
ivan-dalmet Oct 31, 2023
2f01553
fix: Card shadows and admin background
ivan-dalmet Oct 31, 2023
e1c1c81
fix: Save wording
ivan-dalmet Oct 31, 2023
f36c8cb
fix: Remove shadow on link variant for buttons
ivan-dalmet Oct 31, 2023
91c435c
fix: Submit button on profile form
ivan-dalmet Oct 31, 2023
69ca2f0
fix: Add visibility for search clear button
ivan-dalmet Oct 31, 2023
04b800a
feat: Update deps
ivan-dalmet Nov 2, 2023
0d96cd4
fix: Remove broken loading
ivan-dalmet Nov 3, 2023
deccfbd
fix: GuardAuthenticated if isAuthenticated change
ivan-dalmet Nov 3, 2023
c41f4a7
fix: Improve authenticated guard
ivan-dalmet Nov 3, 2023
5922842
fix: Title metadata
ivan-dalmet Nov 3, 2023
d9124be
feat: Add cancel button
ivan-dalmet Nov 3, 2023
2e76192
feat: Improve form UX
ivan-dalmet Nov 4, 2023
d7953e9
fix: Remove unused imports
ivan-dalmet Nov 6, 2023
390424a
feat: new Datalist
ivan-dalmet Nov 6, 2023
735e662
fix: Use text-dimmed everywhere app
ivan-dalmet Nov 8, 2023
86ec771
fix: Datalist alignment
ivan-dalmet Nov 8, 2023
2be977f
fix: App nav mobile safe zone
ivan-dalmet Nov 8, 2023
846429a
fix: Button style
ivan-dalmet Nov 8, 2023
5e6468b
feat: Add cancel buttons on user account forms
ivan-dalmet Nov 8, 2023
455d6a9
fix: Remove unused import
ivan-dalmet Nov 8, 2023
9a6c8a7
fix: Datalist loading
ivan-dalmet Nov 8, 2023
6355ea3
fix: Clean datalist empty state
ivan-dalmet Nov 8, 2023
72f9810
Update day picker component (#413)
DecampsRenan Nov 14, 2023
d366d06
Update src/features/auth/LoginForm.tsx
DecampsRenan Nov 14, 2023
66a50b9
feat: translation and ui improvements
yoannfleurydev Nov 15, 2023
10e4a41
feat(daypicker): some code and typings improvements (#418)
yoannfleurydev Nov 17, 2023
9c516be
fix: missing t in dependencies
yoannfleurydev Nov 17, 2023
eeb9952
fix: field select multi + creatable
yoannfleurydev Nov 17, 2023
ff459fc
fix: improve select and remove multiselect
yoannfleurydev Nov 17, 2023
eb0c41d
fix: Missing z.infer on user type
ivan-dalmet Nov 20, 2023
c6ee946
fix: Update timeouts for playwright
ivan-dalmet Nov 21, 2023
2489bf6
feat: Add max failure for e2e test in ci
ivan-dalmet Nov 21, 2023
936aae6
fix: Open api issue
ivan-dalmet Nov 22, 2023
7c88d7c
fix: Use custom empty text in repositories admin
ivan-dalmet Nov 24, 2023
9581ca5
feat: Add basic test for rest API schema
ivan-dalmet Nov 27, 2023
0b2263b
fix: e2e tests
ivan-dalmet Nov 28, 2023
7904fad
fix: Datalist empty state
ivan-dalmet Nov 29, 2023
e3ecb22
feat: Update storybook
ivan-dalmet Nov 29, 2023
b996511
fix: Limit github actions to 30 minutes max
ivan-dalmet Nov 30, 2023
b8afcbe
fix: Minor style fixes
ivan-dalmet Nov 30, 2023
7da353f
fix: Seed file typo
ivan-dalmet Dec 1, 2023
a303483
fix: Simplify seed for duplication
ivan-dalmet Dec 1, 2023
f5a882a
fix: Comment typo in router.ts file
ivan-dalmet Dec 1, 2023
5c47189
fix: set eslint rule sonarjs/prefer-immediate-return to warn instead …
ivan-dalmet Dec 1, 2023
d4418b4
fix: Typescript issue for optional nextCursor
ivan-dalmet Dec 1, 2023
f62b10e
fix: use prisma transaction instead of Promise.all
ivan-dalmet Dec 1, 2023
3746555
fix: Extract where clause on listing into constant
ivan-dalmet Dec 4, 2023
f6483d3
upgrade dependencies
ivan-dalmet Dec 8, 2023
20fdbe8
fix: Sonar bug report
ivan-dalmet Dec 8, 2023
41d345b
fix: Sonar code smell
ivan-dalmet Dec 8, 2023
fea572e
fix: Rollback playwright to version 1.39.0 waiting for 1.41.0
ivan-dalmet Dec 8, 2023
1630f01
fix: Handle case if APP_PATH or ADMIN_PATH are empty
ivan-dalmet Dec 8, 2023
f0469a2
fix: Move readme assets
ivan-dalmet Dec 20, 2023
69b65a4
fix: Add default input to empty object in listing tRPC routes
ivan-dalmet Dec 21, 2023
61d8ac9
fix: Simplify loadmore ui
ivan-dalmet Dec 21, 2023
9c09299
fix: Remove useless imports
ivan-dalmet Dec 21, 2023
9628eb6
fix: Invalidation repositories after delete
ivan-dalmet Dec 21, 2023
e1f4331
fix: Add divider in repository actions for consistency
ivan-dalmet Dec 22, 2023
6dfc564
[V2] feat: docker compose postgres (#429)
yoannfleurydev Dec 22, 2023
3d9d317
fix: Docker postgres version
ivan-dalmet Dec 22, 2023
507930c
fix: Typo in readme
ivan-dalmet Dec 22, 2023
e1142d8
feat: Add button danger primary
ivan-dalmet Dec 22, 2023
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
  •  
  •  
  •  
19 changes: 16 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
NEXT_PUBLIC_BASE_URL="http://localhost:3000"
NEXT_PUBLIC_API_BASE_URL="http://localhost:3000/api/jhipster-mocks"

# Use the following environment variables to show the environment name.
NEXT_PUBLIC_DEV_ENV_NAME="staging"
NEXT_PUBLIC_DEV_ENV_COLOR_SCHEME="teal"

DATABASE_URL="file:./dev.db"
AUTH_SECRET="Replace me with `openssl rand -base64 32` generated secret"
# DATABASE
DATABASE_URL="postgres://startui:startui@localhost:5432/startui"
DATABASE_DOCKER_IMAGE_NAME="start-ui-db"
DATABASE_DOCKER_IMAGE_PORT="5432"

# DEMO
NEXT_PUBLIC_IS_DEMO="false"

# AUTH
AUTH_SECRET="Replace me with `openssl rand -base64 32` generated secret"

# EMAILS
EMAIL_SERVER="smtp://username:[email protected]:1025"
EMAIL_FROM="Start UI <[email protected]>"

# LOGGER
LOGGER_LEVEL="info"
LOGGER_PRETTY="true"
56 changes: 0 additions & 56 deletions .env.validator.js

This file was deleted.

7 changes: 7 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"plugin:storybook/recommended"
],
"rules": {
"react/no-unescaped-entities": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
Expand All @@ -16,6 +17,12 @@
"sonarjs/cognitive-complexity": ["warn", 50]
},
"overrides": [
{
"files": ["./src/**/*.*"],
"rules": {
"no-process-env": "error"
}
},
{
"files": [
"*.stories.tsx",
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ closes #<issue_id>
- [ ] I performed a self review of my code
- [ ] I ensured that everything is written in English
- [ ] I tested the feature or fix on my local environment
- [ ] I ran the `yarn storybook` command and everything is working
- [ ] I ran the `pnpm storybook` command and everything is working
- [ ] If applicable, I updated the translations for english and french files
(If you cannot update the french language, just let us know in the PR description)
- [ ] If applicable, I updated the README.md
Expand Down
36 changes: 21 additions & 15 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: 🚀 Start UI [web]

on:
push:
branches:
- master
pull_request:
- push
- pull_request

jobs:
build-and-test:
Expand All @@ -13,32 +11,40 @@ jobs:

strategy:
matrix:
node: [16, 'lts/*']
node: [18, 20, 'lts/*']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-pnpm-store-${{ env.cache-name }}-
${{ runner.os }}-pnpm-store-
${{ runner.os }}-

- name: Install dependencies
run: yarn install
run: pnpm install

- name: Lint code and types
run: yarn lint

- name: Run components tests
run: yarn test:ci
run: pnpm lint
87 changes: 87 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master, v2-going-full-stack]

jobs:
E2E:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_BASE_URL: http://localhost:3000
NEXT_PUBLIC_DEV_ENV_NAME: tests
DATABASE_URL: postgres://startui:startui@localhost:5432/startui
NEXT_PUBLIC_IS_DEMO: false
AUTH_SECRET: Replace me with `openssl rand -base64 32` generated secret
EMAIL_SERVER: smtp://username:password@localhost:1025
EMAIL_FROM: Start UI <[email protected]>
services:
postgres:
image: postgres

env:
POSTGRES_PASSWORD: startui
POSTGRES_USER: startui
POSTGRES_DB: startui

options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-${{ env.cache-name }}-
${{ runner.os }}-pnpm-store-
${{ runner.os }}-

- name: Install dependencies
run: pnpm install

- name: Install Playwright Browsers
run: pnpm playwright install --with-deps

- name: Migrate database
run: pnpm db:push

- name: Add default data into database
run: pnpm db:seed

- name: Run Playwright tests
run: pnpm e2e

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
20 changes: 17 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,25 @@ yarn-error.log*
# vercel
.vercel

# cypress
/cypress/videos

# Build info
.build-info.json
openapi.json

# Prisma
prisma/dev.db
prisma/dev.db-journal

# Emails
.react-email

# playwright
/test-results/
/playwright-report/
/playwright/.cache/

# next-pwa recommandation
**/public/workbox-*.js*
**/public/sw.js*
**/public/worker-development.js*

certificates
30 changes: 10 additions & 20 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
image: node:lts

cache:
key:
files:
- pnpm-lock.yaml
paths:
- node_modules
- .yarn
- .pnpm-store

stages:
- build
- test

build:
stage: build
before_script:
- corepack enable
- corepack prepare pnpm@latest-8 --activate
- pnpm config set store-dir .pnpm-store
script:
- echo "Installing dependencies"
- yarn install
- pnpm install
- echo "Building application"
- yarn build

test:
image:
# Make sure to update this version number on version update
name: cypress/included:11.2.0
entrypoint: ['']
stage: test
script:
- yarn install
- yarn cypress install
- echo "Checking format code eslint"
- yarn eslint .
- echo "Checking types"
- yarn tsc --noEmit
- echo "Running tests"
- yarn test:ci --browser chrome
- pnpm build
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint
pnpm lint
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ public
*.mdx
.env*
!.env.validator.js
pnpm-lock.yaml
18 changes: 18 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Prettier configuration. Please avoid changing the current configuration.
// But if you do so, please run the `npm run pretty` command.
/** @type {import("prettier").Options} */
const config = {
endOfLine: 'lf',
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
arrowParens: 'always',
importOrder: ['^react$', '^(?!^react$|^@/|^[./]).*', '^@/(.*)$', '^[./]'],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
importOrderParserPlugins: ['jsx', 'typescript'],
plugins: ['@trivago/prettier-plugin-sort-imports'],
};

module.exports = config;
12 changes: 0 additions & 12 deletions .prettierrc.json

This file was deleted.

Loading
Loading