What it is
Cryptocurrencies Handbook is a small reference web app for looking up common tokens. A reader types a name or ticker, picks a result and lands on a page with a short description, tags and a link to the project's website. I built it to get hands-on with Next.js, React and the Mantine component library.
The problem
Most crypto sites are price dashboards. A newcomer who only wants to know what a token is has to read around live charts. This app answers one question: what is this token, in a few sentences?
How it works
The app is a Next.js 12 project that uses the Pages Router. All data comes from one TypeScript file, so there is no backend and no API call at runtime.
| File | Role |
|---|---|
lib/database.ts | Defines a Token class and a database object with 11 tokens. Exports search() and match(). |
lib/SearchForm.tsx | Search box. Shows matching tokens as the reader types. |
pages/index.tsx | Home page with the title and the search form. |
pages/tokens/[token_name].tsx | Detail page for one token. |
pages/_app.tsx | Wraps the app in MantineProvider with a dark color scheme. |
Each Token holds a name, ticker, contract address, logo URL, description, tags and website. Search runs in the browser. It starts after the third typed character and keeps tokens whose name or ticker contains the query, ignoring case.
The detail pages are generated at build time. getStaticPaths lists every token in the database with fallback: false. A name that is not in the database returns a 404.
Design decisions
A local data file instead of a database or live API. The commit history shows a change of direction. On 27 May 2022 the repository added redis-om packages, a search schema and createIndex and search endpoints. On 28 May 2022 a commit titled "changed to a local database" replaced them. A reference app that shows static descriptions gains little from a server, an index or an external service. The trade-off is that adding a token means editing code and redeploying.
Class-based records. A later commit moved the data to a Token class. This gives every entry the same fields, so a missing field is a compile-time error in TypeScript.
Client-side search with a three-character minimum. Searching 11 records in the browser is instant. The minimum length avoids listing nearly every token after one keystroke.
Exact-name lookup on detail pages. A commit on 28 May 2022 switched the token page from a full search to an exact name match. This stops a partial match from showing the wrong token.
Run it locally
- Clone the repository:
git clone https://github.com/WhyAsh5114/next-cryptocurrencies-handbook.git - Install dependencies:
npm install - Start the dev server:
npm run dev - Open
http://localhost:3000.
To add a token, add an entry to the database object in lib/database.ts.
Reference
| Tool | Version | Use |
|---|---|---|
| Next.js | 12.1.6 | Routing and static generation. |
| React | 18.1.0 | UI. |
| Mantine | ^4.2.6 | Inputs, text, badges and the dark theme. |
| TailwindCSS | ^3.0.24 | Layout utility classes. |
tabler-icons-react | ^1.48.0 | Search icon. |
Token logos load from cryptologos.cc by URL, so the app needs a network connection to show them.
Notes from the author
Building a narrow project is a fast way to learn a framework. This one was my introduction to the Next.js ecosystem and to React component patterns. Mantine also showed me that component libraries trade customization for speed. That experience shaped my later preference for utility-first styling with Tailwind when I need more control.
Outcome
- The first commit is dated 26 May 2022 and the working app was in place by 28 May 2022.
- A contributor,
samarthsb4real, fixed broken token links in two merged pull requests. - The last commit is dated 19 October 2024.
- The Vercel deployment listed in the repository (
next-cryptocurrencies-handbook.vercel.app) returned a 404 when I checked on 19 October 2026.