Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrispoulter/halcyon
A web application template.
https://github.com/chrispoulter/halcyon
nextjs react
Last synced: 2 days ago
JSON representation
A web application template.
- Host: GitHub
- URL: https://github.com/chrispoulter/halcyon
- Owner: chrispoulter
- Created: 2020-02-25T09:03:09.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-05T14:12:24.000Z (3 months ago)
- Last Synced: 2024-09-05T21:50:27.743Z (3 months ago)
- Topics: nextjs, react
- Language: TypeScript
- Homepage: https://halcyon.chrispoulter.com
- Size: 2.52 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Halcyon
A Next.js web project template 👷 Built with a sense of peace and tranquillity 🙏
## Features
- Next.js
[https://nextjs.org/](https://nextjs.org/)
- TanStack Query
[https://tanstack.com/query](https://tanstack.com/query)
- React Hook Form
[https://react-hook-form.com/](https://react-hook-form.com/)
- Zod
[https://zod.dev/](https://zod.dev/)
- Auth.js
[https://authjs.dev/](https://authjs.dev/)
- Tailwind CSS
[https://tailwindcss.com/](https://tailwindcss.com/)
- Vitest
[https://vitest.dev/](https://vitest.dev/)
- Playwright
[https://playwright.dev/](https://playwright.dev/)
- Docker
[https://www.docker.com/](https://www.docker.com/)
- GitHub Actions
[https://github.com/features/actions](https://github.com/features/actions)## Getting Started
### Prerequisites
- Halcyon API
[https://github.com/chrispoulter/halcyon-api](https://github.com/chrispoulter/halcyon-api)### Install dependencies
Install NPM packages:
```
npm install
```### Configure environment variables
For local development, you'll need to create a `.env.local` file in the root of the project to define the environment variables. This file is ignored by Git, so the secrets will not be committed to the repository.
```
NEXT_PUBLIC_VERSION=1.0.0-localNEXT_PUBLIC_API_URL=http://localhost:5257
JWT_SECURITY_KEY=super_secret_key_that_should_be_changed
JWT_ISSUER=HalcyonApi
JWT_AUDIENCE=HalcyonClientAUTH_URL=http://localhost:3000
AUTH_SECRET=super_secret_key_that_should_be_changed
```### Running the development server
Once the dependencies are installed, you can run the development server:
```
npm run dev
```Open http://localhost:3000 in your browser to see the project running.
## Building for Production
To build the project for production:
```
npm run build
```This command will create an optimized build in the `.next` folder.
## Testing
### Unit Tests (Vitest)
To run unit tests:
```
npm run test
```### End-to-End Tests (Playwright)
After installing the project dependencies, run the following command to install Playwright and its browser dependencies:
```
npm run e2e:install
```To execute the E2E tests, use the following command:
```
npm run e2e:test
```## Linting & Formatting
To lint and format the code:
```
npm run lint
npm run format
```## Contributing
Feel free to submit issues or pull requests to improve the template. Ensure that you follow the coding standards and test your changes before submission.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.