-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4308c63
commit e17fdeb
Showing
2 changed files
with
89 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,82 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
# Next.js & ElysiaJS Template Application | ||
|
||
Hey there! This project provides a robust foundation for building modern web applications with ElysiaJS on the backend and Next.js on the client. It's already configured and ready to be used, so you won't spend hours configuring and setting up your environment before you can start coding, let alone play with Elysia. | ||
|
||
## Features | ||
|
||
- **ElysiaJS Backend**: Utilize the power of ElysiaJS for building scalable and efficient server-side code, supercharged by Bun runtime, Static Code Analysis, and Dynamic Code Injection. Being one of the top-performing TypeScript frameworks, it's comparable to Go and Rust. | ||
- **Next.js Integration**: Use Next.js for server-side rendering, routing, and more on the frontend. | ||
- **Eden Connector**: Achieve seamless type-safe communication between the client and server with Next.js integration. Synchronize types across all applications and move fast without breaking anything, like tRPC. | ||
- **Prisma ORM and PostgreSQL Integration**: Simplify database operations with pre-configured Prisma ORM and PostgreSQL setup. | ||
- **Lucia Authentication**: Implement secure authentication flows including sign-up, sign-in, and log-in with ease. Comes with already configured middlewares, passed down sessions and contexts accessible through every endpoint, protected routes, and/or public ones. | ||
- **Swagger Plugin**: Document your API endpoints effortlessly with Swagger, accessible via `/api/swagger`. | ||
- **Logestic Logging**: Keep track of application events and actions with Logestic logger plugin for enhanced monitoring and debugging. An advanced and customizable logging library for ElysiaJS built by the community. | ||
- **Dockerized Environment**: Easily containerize your application with Docker, allowing for seamless deployment and development environments. Your dev environment parallelly starts your client, server & composes docker, all in one command. | ||
- **CORS Plugin**: Ensure secure communication between client and server with CORS integration plugin developed by the community. | ||
- **ESLinting and Prettier**: Maintain code quality and consistency with ESLint and Prettier, easily runnable with commands in package.json. | ||
- **Continuous Integration (CI)**: GitHub CI set up to check if your code meets standards on each push you make. | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
To get started with the Next.js & ElysiaJS template application, follow these steps: | ||
|
||
1. **Clone the Repository**: | ||
|
||
```bash | ||
git clone [email protected]:altinthaqi/next-elysia-template.git | ||
``` | ||
|
||
2. **Install Dependencies**: | ||
|
||
```bash | ||
cd next-elysia-template | ||
bun install | ||
``` | ||
|
||
3. **Configure Environment Variables**: | ||
|
||
`.env` comes readily configured; feel free to update/fill in the necessary variables. | ||
|
||
4. **Run the Development Server** (this will docker-compose in parallel): | ||
|
||
```bash | ||
bun --bun run dev | ||
``` | ||
|
||
or, if you want to run the server with node then you can omit `--bun`: | ||
|
||
```bash | ||
bun run dev | ||
``` | ||
|
||
5. **Run Docker separately** (optional): | ||
|
||
You can build and start the Docker containers separately from the development environment using Docker Compose: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
```bash | ||
docker-compose up | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
just make sure to update `package.json` from: | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
```bash | ||
"dev": "concurrently \"docker-compose up\" \"next dev\"", | ||
``` | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
to: | ||
|
||
## Learn More | ||
```bash | ||
"dev": "next dev", | ||
``` | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
6. **Start Building!**: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
With the development server running, you're all set to start building your application. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
## Contributing | ||
|
||
## Deploy on Vercel | ||
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request. | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
## License | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
This project is licensed under the [MIT License](https://github.com/altinthaqi/next-elysia-template/blob/main/license). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Altin Thaci | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |