The goal of this project is to provide a NextJS starter application, which comes pre-configured with the USWDS-based Comet Component Library as well as other tools to accelerate development. Some of these tools are as follows:
- Tooling: Turbopack
- Platform: Next.js with TypeScript
- Component Library: Comet Component Library
- Data Visualization: Victory Charts
- State Management: Recoil
- Form Validation: React Hook Form
- Code Analysis: ES Lint
- Code Formatting: Prettier
- Unit Testing: Vitest with React Testing Library
- End-to-End (E2E) Testing: Playwright
- API support: Next.js APIs with Axios and React Query
- Authentication support: NextAuth with Keycloak
- To install dependencies, run the following:
npm install
- To run locally with SSO, add a file called
.env.local
to thecomet-starter-next
directory. Copy and paste the template below and replace the placeholder values with your own (optional):
KEYCLOAK_CLIENT_ID=[SOME_KEYCLOAK_CLIENT_ID] # Ex: dev-client
KEYCLOAK_CLIENT_SECRET=[SOME_KEYCLOAK_CLIENT_SECRET] # Ex: 123456789abcdefg
KEYCLOAK_ISSUER=[SOME_KEYCLOAK_ISSUER] # Ex: http://localhost:8088
- To start the app, run the following:
npm run dev
To make sure your changes do not break any unit tests, run the following:
npm run test
Ensure to review the coverage directory for code coverage details.
npm run test:coverage
Note: running E2E tests requires the app to be running as well, run the following:
npm run e2e