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

feat: add nextjs skeleton for the ui #11

Merged
merged 24 commits into from
May 13, 2024
Merged

Conversation

kayra1
Copy link
Contributor

@kayra1 kayra1 commented Apr 26, 2024

Description

Main UI Code

This is a nextjs UI skeleton which is served by the gocert application located in the UI folder. Simply do:
bun i / npm i
and
bun run build / npm run build

to produce an out/ folder that contains the static assets for the frontend. This directory is then served up.

CI for the frontend

On top of the usual CI, there is now a step to build the website to make sure that the rock will build without issue, and there is another step to run the component tests for the nextjs application.

Build

Building uses the mechanism nextjs provides. There is first class IDE support for this option.

Testing

The nextjs app is tested using vitest, which does component level tests. Each test output reports directly to github actions, giving embedded test response messages:

image

The ROCK

The ROCK now has an extra step to build the UI from within gocert in the build step, and go's installer will copy over the necessary assets.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that validate the behaviour of the software
  • I validated that new and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@kayra1 kayra1 requested a review from a team as a code owner April 26, 2024 08:41
@kayra1 kayra1 requested a review from gruyaume April 26, 2024 08:43
internal/api/handlers.go Outdated Show resolved Hide resolved
ui/README.md Outdated Show resolved Hide resolved
ui/README.md Outdated Show resolved Hide resolved
ui/public/next.svg Outdated Show resolved Hide resolved
@gruyaume gruyaume marked this pull request as draft April 26, 2024 11:17
@kayra1 kayra1 force-pushed the TLSENG-226-frontend-skeleton branch from 366a448 to faf40e8 Compare April 26, 2024 13:21
@kayra1 kayra1 marked this pull request as ready for review April 26, 2024 13:48
@kayra1 kayra1 requested a review from gruyaume April 26, 2024 13:48
.github/workflows/main.yml Show resolved Hide resolved
ui/README.md Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
rockcraft.yaml Outdated Show resolved Hide resolved
@kayra1 kayra1 force-pushed the TLSENG-226-frontend-skeleton branch from ace13cd to 429deb9 Compare April 30, 2024 13:07
@kayra1 kayra1 marked this pull request as draft May 6, 2024 09:40
@kayra1 kayra1 force-pushed the TLSENG-226-frontend-skeleton branch from 8b76948 to d8bcc0b Compare May 9, 2024 11:00
@kayra1 kayra1 marked this pull request as ready for review May 9, 2024 11:32
ui/README.md Outdated Show resolved Hide resolved
ui/bun.lockb Outdated Show resolved Hide resolved
ui/package.json Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
kayra1 and others added 2 commits May 10, 2024 12:34
@kayra1 kayra1 requested a review from gruyaume May 10, 2024 09:57
@kayra1 kayra1 merged commit 463b3a3 into main May 13, 2024
11 checks passed
@kayra1 kayra1 deleted the TLSENG-226-frontend-skeleton branch May 13, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants