- This is a Next.js React web application, written in TypeScript.
- U.S. Web Design System provides themeable styling and a set of common components.
- React-USWDS provides React components already with USWDS theming out of the box. For a reference point starting out, see
react-uswds-hello.tsx
which includes examples of react-uswds component usage. - Storybook is included as a frontend workshop.
├── .storybook # Storybook configuration
├── public # Static assets
│ └── locales # Internationalized content
├── src # Source code
│ ├── components # Reusable UI components
│ ├── app # Page routes and data fetching
│ │ └── api # API routes (optional)
│ └── styles # Sass & design system settings
├── stories # Storybook pages
└── tests # Unit and E2E tests
Next.js provides the React framework for building the web application. Pages are defined in the app/
directory. Pages are automatically routed based on the file name. For example, pages/[locale]/page.tsx
is the home page.
Learn more about developing Next.js applications
Before running the server, duplicate the /frontend/env.development
file and name the copy /frontend/.env.local
, in order to avoid checking in any sensitive data to Github.
From the /frontend
directory:
- Install dependencies
npm ci
- Optionally, disable telemetry data collection
npx next telemetry disable
- Run the local development server
npm run dev
- Navigate to localhost:3000 to view the application
npm run build
- Builds the production Next.js bundlenpm start
- Runs the Next.js server, after building the production bundle
See development.md for full installation and development instructions.