A Next.js application that displays real-time cryptocurrency prices using the CoinGecko API.
- Real-time cryptocurrency price tracking
- Search functionality to filter cryptocurrencies
- Manual refresh button to update prices
- Responsive design with card and table views
- Loading indicators and error handling
- Automatic data refreshing
Documentation for this Project can be accessed through the following steps :-
- Navigate to
docs
directorycd docs
- Install the dependencies
npm install #or yarn install
- Run the Document Server
npm run start
Open http://localhost:4000 in your browser to see documentation.
- Next.js 14: React framework with App Router
- TypeScript: Type safety
- Tailwind CSS: Styling
- React Query: State management and data fetching
- CoinGecko API: Cryptocurrency data
- Node.js 18 or later
- npm or yarn
- Clone the repository
- Navigate to the web-app directory:
cd web-app
- Install dependencies:
npm install # or yarn
npm run dev
# or
yarn dev
Open http://localhost:3000 in your browser to see the application.
npm run build
# or
yarn build
Then, to start the production server:
npm run start
# or
yarn start
app/
: Application code using Next.js App Routercomponents/
: React componentshooks/
: Custom React hooksproviders/
: Context providersservices/
: API servicespage.tsx
: Main page componentlayout.tsx
: Root layout component
The application uses the CoinGecko API to fetch cryptocurrency data. The main endpoints used are:
/coins/markets
: Get cryptocurrency market data/coins/list
: Get a list of all available cryptocurrencies
API calls are managed using React Query for efficient caching and state management.