TrocUp is a platform that enables users to exchange products without involving money. It revives the traditional bartering system, enhanced by advanced AI technology to assess the value of items ✨.
This is a Next.js project. Check out this link for an interactive Next.js tutorial.
-
To enforce a Node.js version, the project uses fnm, a fast and simple Node.js version manager, built in Rust. Check out the documentation for more information and quick install.
-
The default package manager is PNPM
npm install -g pnpm- Install the dependencies
pnpm install-
Refer to
.env.exampleto create your.envand.env.local -
It uses Jest for unit testing.
-
It has a strong set of linters from Eslint.
-
Tailwind for styling.
-
Shadcn as a component library.
- To install components, themes, hooks, utils and more, your can use:
npx shadcn add
- To install components, themes, hooks, utils and more, your can use:
-
React Query to efficiently manage server state and caching.
-
Axios for making HTTP requests.
-
Zustand for state management (for client components only), along with Immer middleware for conveniency.
-
T3 Env for typing environment variables (src/types/environment.ts file).
-
Zod for type inference and form validation.
-
next/fontNext's font manager linked to Google Font. -
Knip to check for dead code and unused dependencies (tweak knip.json to your liking).
-
Eraser to make diagrams/UMLs (folder named
UMLs). Download the plugin to visualize diagrams (plugin id: EraserLabs.eraserlabs) -
Clerk for user authentication
-
React-hot-toast for toasters (user notifications)
-
We use JSDoc to document the code.
- Start the development server by running:
pnpm dev- If you don't have Prettier plugin that formats code on save you can alternatively run:
pnpm format- Check if your branch is up to date with the main branch:
git pull -r origin mainIf either of these following commands fail, the PR won't pass:
# for checking the linter
pnpm lint
# Typescript
pnpm ts-check
# if there is dead code
pnpm knip
# Jest unit tests
pnpm test
# or for all of the above rules
pnpm troc