The Media Index is a modern web application for browsing and searching media items. Built with Next.js, TanStack Query, and MongoDB, it provides a fast, type-safe, and accessible experience.
- Next.js (React framework)
- TanStack Query (data fetching and caching)
- MongoDB (database)
- Biome (code formatting and linting)
Below are some screenshots of The Media Index app:
git clone https://github.com/BioHazard786/The-Media-Index.git
cd the-media-indexnpm install
# or
yarn install
# or
bun installCreate a .env.local file in the root directory with the following variables:
MONGODB_URI=mongodb+srv://<username>:<password>@<cluster-url>/<database>?retryWrites=true&w=majority
NEXT_PUBLIC_CHANNEL_LINK=https://t.me/<your-telegram-channel>
SEARCH_INDEX_NAME=<your-mongodb-search-index-name>npm run dev
# or
yarn dev
# or
bun run devOpen http://localhost:3000 in your browser.
If you are using MongoDB Atlas, you need to create a search index for efficient text search:
- Go to your cluster in MongoDB Atlas.
- Navigate to Collections and select your database and the
INDEXcollection. - Click on the Search Indexes tab.
- Click Create Search Index and choose the fields you want to index (e.g.,
name,alt_name, etc.). - Save the index.
The main collection is called INDEX. Example schema:
{
_id: number;
name: string;
alt_name: string;
anilist_id: string;
tmdb_movie_id: string;
image_link: string;
tmdb_series_id: string;
tmdb_season: string;
average_color: string;
background_color: string;
text_color: string;
type: string;
}src/app/- Next.js app directorysrc/components/- UI componentssrc/hooks/- Custom React hookssrc/lib/- Utility functions and database connectionsrc/model/- TypeScript modelssrc/server/- Server actions and API logic
This project uses Biome for formatting and linting. To check and fix code:
bunx ultracite lint
bunx ultracite formatDeploy easily on Vercel or Netlify or any platform supporting Next.js.
This project is licensed under the MIT License - see the LICENSE file for details.
Mohd Zaid - Telegram - bzatch70@gmail.com
Project Link: https://github.com/BioHazard786/The-Media-Index


