Skip to content

A site where you can read your favorite mangas and watch your favorite animes ad-free!

License

Notifications You must be signed in to change notification settings

real-zephex/MangaThingy

Repository files navigation

Otaku Verse - Manga Reader Platform

A modern, full-stack manga reading platform built with Next.js, TypeScript, and integrated web scrapers. Browse, search, and read manga from multiple sources with a sleek dark-themed interface.

🎯 Features

  • Multi-Source Scraping: Integrated scrapers for Mangapill and Asurascans
  • Fast Search: Search manga across multiple providers simultaneously
  • Responsive Design: Beautiful dark-themed UI optimized for all devices
  • Chapter Management: Browse chapters, view manga details, and track progress
  • Local Storage: Save reading progress and bookmarks
  • Type-Safe API: Full TypeScript support with Zod schemas
  • Server-Side Rendering: Optimized with Next.js App Router and ISR
  • Production Ready: Tested and deployed on Vercel

πŸ›  Tech Stack

  • Frontend: Next.js 16.1.1, React 19, TypeScript
  • Styling: Tailwind CSS, Shadcn/ui components, Framer Motion
  • API: Hono for REST API routes, Axios for HTTP requests
  • Scraping: Cheerio for HTML parsing
  • State Management: React hooks, Context API
  • Validation: Zod for schema validation
  • UI Components: Radix UI, Lucide Icons

πŸ“‹ Project Structure

new-manga-site/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/                    # Hono API routes
β”‚   β”‚   └── [[...route]]/
β”‚   β”‚       └── route.ts        # All scraper endpoints
β”‚   β”œβ”€β”€ manga/                  # Manga detail pages
β”‚   β”œβ”€β”€ page.tsx                # Homepage
β”‚   └── layout.tsx
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ scrapers/               # Scraper implementations
β”‚   β”‚   β”œβ”€β”€ mangapill.ts
β”‚   β”‚   β”œβ”€β”€ asurascans.ts
β”‚   β”‚   β”œβ”€β”€ types.ts
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ services/               # API client services
β”‚   β”‚   β”œβ”€β”€ manga.actions.ts
β”‚   β”‚   └── manga.service.ts
β”‚   └── api-client.ts           # Type-safe frontend API client
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ custom/                 # Custom components
β”‚   β”‚   β”œβ”€β”€ landing/
β”‚   β”‚   β”œβ”€β”€ info/
β”‚   β”‚   └── reader/
β”‚   └── ui/                     # Shadcn/ui components
β”œβ”€β”€ public/                     # Static assets
└── [config files]

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ or Bun
  • npm, yarn, pnpm, or bun package manager

Installation

  1. Clone the repository
git clone <repository-url>
cd new-manga-site
  1. Install dependencies
bun install
# or
npm install
  1. Run the development server
bun run dev
# or
npm run dev
  1. Open in browser Navigate to http://localhost:3000

πŸ“š Available API Endpoints

Mangapill

  • GET /api/mangapill/search/:query - Search manga
  • GET /api/mangapill/info/:id - Get manga details
  • GET /api/mangapill/pages/:id - Get chapter pages
  • GET /api/mangapill/newest - Get newest manga
  • GET /api/mangapill/recent - Get recently updated
  • GET /api/mangapill/images/:imageUrl - Proxy images

Asurascans

  • GET /api/asurascans/search/:query - Search manga
  • GET /api/asurascans/info/:id - Get manga details
  • GET /api/asurascans/pages/:id - Get chapter pages
  • GET /api/asurascans/popular - Get popular manga
  • GET /api/asurascans/latest/:page - Get latest updates
  • GET /api/asurascans/genres/:type - Get by genre
  • GET /api/asurascans/genre-list - List available genres

πŸ’» Usage

Frontend API Client

Use the type-safe API client in React components:

import { scrapersAPI } from "@/lib/api-client";

// Search manga
const results = await scrapersAPI.mangapill.search("naruto");

// Get manga info
const info = await scrapersAPI.mangapill.info("/manga/12/solo-leveling");

// Get chapter pages
const pages = await scrapersAPI.mangapill.pages(chapterId);

Server Components

Fetch data directly in server components:

import { MangapillService } from "@/lib/services/manga.actions";

export default async function MangaPage() {
  const manga = await MangapillService.getNewest();
  return <div>{/* render manga */}</div>;
}

πŸ— Building for Production

Build

bun run build
# or
npm run build

Start Production Server

bun run start
# or
npm run start

πŸ“– Documentation

For detailed API documentation and examples, see:

πŸ”„ URL Encoding

The API automatically handles special characters in IDs (slashes, spaces, etc.):

// Works automatically - no manual encoding needed
const manga = await scrapersAPI.mangapill.info("/manga/12/solo-leveling");

πŸ“ Development Notes

  • Hot Reload: Changes to files are automatically reflected in the browser
  • TypeScript: Full type checking with strict mode enabled
  • Linting: ESLint configured for code quality
  • Formatting: Prettier configured for consistent code style

🀝 Contributing

Contributions are welcome! Please feel free to submit pull requests.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌐 Supported Sources

🎨 Customization

The UI is built with Tailwind CSS and Shadcn/ui components, making it easy to customize:

  • Dark Theme: Primary color scheme is dark with accent colors
  • Components: Located in components/ directory
  • Styles: Global styles in app/globals.css
  • Tailwind Config: Customize in tailwind.config.ts

Happy Reading! πŸ“šβœ¨

About

A site where you can read your favorite mangas and watch your favorite animes ad-free!

Topics

Resources

License

Stars

Watchers

Forks

Contributors