This project is a URL shortener that allows you to create and manage shortened URLs. Users can access short URLs to redirect to the original web page.
To get started with this project, follow these steps:
Make sure you have the following software and tools installed:
-
Clone the repository to your local machine.
-
Change to the project directory.
-
Install project dependencies.
-
Configure environment variables.
Run the development server: (The application will be available at http://localhost:3000.)
npm run dev- Shorten long URLs and manage shortened URLs.
- Access shortened URLs to redirect to the original web page.
The t3-app (https://create.t3.gg/)
- Next.js
- Prisma
- React
- Tailwind CSS
- and more...
Our project uses GitHub Actions for continuous integration (CI). The CI process plays a crucial role in ensuring code quality, running tests, and providing an extra layer of verification before code changes are merged into the project. Also, it reduces the build time at Vercel by HALF.
All env variables except NODE_ENV should be added in the ENV section (but doesn't have to be useable values) due to Env Check.
Our complete CI configuration is defined in the GitHub Actions workflow file. You can review this file to understand the details of our CI setup, including the specific steps, tests, and checks that are run as part of the CI process.
By providing this information, we aim to maintain transparency in our development process and ensure that our codebase is reliable and high-quality.
We've integrated Husky pre-commit hooks into this project to ensure code quality and formatting consistency. These hooks run automatically before each commit to keep the codebase clean and maintainable.
The pre-commit hooks include the following tasks:
-
Prisma Format: Formats Prisma schema files to ensure consistency and readability.
-
Prettier Check: Checks the entire codebase for formatting issues. It ensures that the code adheres to the defined coding style and formatting rules.
-
Linting: Runs ESLint to identify and report any code quality issues. This helps maintain code consistency and enforces best practices.
When you make a commit, Husky will automatically execute these tasks, and if any issues are found, the commit will be blocked until they are resolved. This ensures that every commit meets the project's quality and style standards.
Enjoy the benefits of automated code quality and formatting checks with Husky!
The project uses various packages and dependencies, including:
- @clerk/nextjs
- @prisma/client
- @radix-ui/react-label
- @tanstack/react-query
- @trpc/client
- @trpc/next
- @trpc/react-query
- @trpc/server
- @upstash/ratelimit
- and more...
For the full list of dependencies, refer to the project's package.json file.
The project includes various scripts for development and production:
npm run build: Build the project for production.npm run db:push: Push changes to the database using Prisma.npm run db:studio: Open Prisma Studio.npm run dev: Start the development server.npm run lint: Lint the code using ESLint.npm run start: Start the production server.npm run prepare: Install Husky for Git hooks.
For a detailed project roadmap, please visit our Roadmap.
Special thanks to the open-source community for the various packages used in this project.
Enjoy using your URL shortener!