π₯ CopJS - Next.js 13.3 Based Boilerplate for Modern Web Applications
Project Status: No Further Development
Note: This project is no longer being actively developed or maintained. However, it remains available for reference or use.
Please be aware that this project is no longer actively maintained. Feel free to use the existing codebase as-is, but no new features or updates are planned.
Thank you for your interest and support in this project.
CopJS is a feature-rich and flexible web application boilerplate built on Next.js 13.3, designed to streamline your development process. With a modern app directory structure and Metadata API, CopJS empowers you to build web applications with ease.
Some notable features of CopJS include:
- Robust Error Handling: CopJS integrates tRPC and zod for handling errors.
- Efficient Database Management: CopJS leverages Prisma as the ORM for seamless and efficient database operations.
- Secure and Scalable: CopJS includes protected routes based on user roles, allowing you to build secure and scalable applications.
- Beautiful UI with Dark/Light Theme: CopJS comes with a built-in ThemeProvider for easy implementation of dark and light modes, offering a visually appealing user interface.
Dependencies
- TypeScript: π» A statically typed, object-oriented programming language that builds on JavaScript.
- Next.js: π A framework for building server-rendered or statically-generated React applications.
- Turbo: ποΈββοΈ High-performance build system for JavaScript and TypeScript codebases.
- tRPC: π A TypeScript-based RPC framework for building scalable and type-safe APIs with minimal boilerplate.
- Zod: 𧩠A TypeScript-first schema builder for static type safety.
- Prisma: ποΈ A powerful and flexible database toolkit that makes it easy to work with databases in your application.
- Next-Auth: π A complete authentication solution for Next.js that supports multiple providers and local authentication.
- Windicss: π¨ A modern and customizable styling solution for Next.js applications.
- Storybook: π Storybook is a frontend workshop for building UI components and pages in isolation.
Developer Experience
- π Internationalization that makes it easy to translate your application
- π
Classnames A utility for conditionally joining class names together
- π Eslint Linter (default NextJS, NextJS Core Web Vitals)
- π Prettier Code Formatter
- π¦ Husky for Git Hooks
- π« Lint-staged for running linters on Git staged files
- π¨ Invalid Environment Variables Check with Zod
Features
- π Dynamic Theme Provider for Dark Mode
- π Seamless Absolute Imports using @ Prefix
- π Customized VSCode Configuration for Better Coding Experience
- π°οΈ Activity tracking with Timestamps added to the Prisma schema
- π« Custom 404 and 500 error pages with localization for improved user experience
- π User Roles using next-auth with extended session types
- π‘οΈ Protected API routes using tRPC and NextAuth with tRPC
- π User authentication with NextAuth and CredentialsProvider with tRPC, Prisma and zod
- π Custom Sign-In, Sign-Up Page & Password Reset Page with NextAuth and tRPC with zod
- π« Custom Error Messages for NextAuth Providers
- π« Translated Zod Error Messages
Built-in Advantages from Next.js
- π₯ Minimized HTML & CSS
- π₯ Live Reload
- π― Cache Busting Guarantee
Philosophy
- π§ The code is minimal, giving you the freedom to make necessary adjustments to fit your needs and preferences.
- π Production-ready and SEO-friendly
Screenshot
Getting Started π
Clone the CopJS repository by running the following command in your terminal:
git clone https://github.com/caglarop/copjs.git
Navigate into the cloned repository:
cd copjs
Install the dependencies by running the following command:
yarn
Configure the environment variables by creating a .env file in the root directory and setting the necessary values.
And then sart the development server by running the following command:
yarn dev
Contributors π€
Contributions are welcome! If you have an idea for a new feature or find a bug, please open an issue or submit a pull request. π
License π
The CopJS boilerplate is open-source software licensed under the MIT License. π