AniPub
A Modern, Ad Free And Simple Anime Watching Site
Install / Use
/learn @AnimePub/AniPubREADME
AniPub: The Ultimate Anime Multiverse
<p align="center"> <img src="https://github.com/AnimePub/AniPub/blob/main/Logo/Ship.png?raw=true" alt="AniPub Logo" width="180"/> </p>Welcome to AniPub, the modern, ad-free, and privacy-first anime streaming platform built for true otakus. Dive into a vast multiverse of anime without distractions, trackers, or interruptions. Powered by a passionate community, AniPub combines blazing-fast performance, intuitive design, and innovative features like AI assistance to redefine how you watch, discover, and connect over anime.
Whether you're binge-watching classics like One Piece or exploring hidden gems, AniPub is your gateway to an endless anime adventure. Open-source, extensible, and community-driven—join us in shaping the future of anime streaming!
Table of Contents
- Features
- Why AniPub?
- Tech Stack
- Architecture Overview
- Installation
- Usage
- API Documentation
- Contributing
- Roadmap
- Community & Support
- Security & Privacy
- License
Features
AniPub is packed with features designed to enhance your anime experience:
- Ad-Free Streaming: Enjoy uninterrupted viewing—no pop-ups, banners, or sponsored content.
- Privacy-Focused: No user tracking, data mining, or third-party analytics. Your watch history stays yours.
- Blazing-Fast Performance: Optimized for speed with cloud hosting, responsive design, and efficient data loading.
- AniPub AI · Zero Two: Your personal AI companion for recommendations, trivia, and chat-based interactions. Ask about plot summaries, character details, or even fan theories!
- Save & Bookmark: Create watchlists, save episodes, and pick up right where you left off.
- Playlists: Curate custom playlists and Track your anime.
- Community Comments: Discuss episodes, theories, and fan art in real-time threaded comments.
- Ratings System: Rate anime and see community averages to discover top-rated shows.
- Download Support (Coming Soon): Offline viewing for your favorite episodes.
- Multi-Device Sync: Seamless experience across desktop, mobile, and tablets.
- Search & Discovery: Advanced search with by Genres or Names upto 8k+ Anime .
- Secure Chat (/chat): Real-time communication between users with secure sessions to discuss anime, share recommendations, or connect with fellow otakus.
- MyAnimeList (MAL) Integration: Connect your MyAnimeList account in settings to sync watchlists, ratings, and progress seamlessly. Uses secure sessions and stores connection info in the user database for validation and data modification. Even if not connected, AniPub uses the Jikan API (unofficial MAL API) to fetch and display detailed anime information on the /details/animename page.
Why AniPub?
In a world flooded with ad-riddled streaming sites, AniPub stands out as a beacon for anime lovers. Born from frustration with bloated platforms, it's crafted with:
- Community at Heart: Open-source contributions drive innovation.
- Simplicity & Elegance: Clean UI inspired by modern web design principles.
- Accessibility: Free forever, with no paywalls or subscriptions.
- Innovation: Integrating AI for smarter, more engaging interactions.
If you're tired of endless ads and privacy invasions, AniPub is your escape pod to pure anime bliss.
Tech Stack
AniPub leverages a robust, modern stack for reliability and scalability:
| Layer | Technologies | Purpose | |-------------|-------------------------------|----------------------------------| | Frontend | EJS, CSS, JavaScript | Server-rendered templates for dynamic UI, custom styling, and interactive elements. | | Backend | Node.js, Express | Handles API requests, routing, and server logic. | | Database | MongoDB | Stores user data, anime metadata, ratings, comments, and playlists. | | Auth | JWT, Google OAuth | Secure authentication and session management. | | Security | Hashed Passwords, HTTPS | Protects user data and ensures secure connections. | | Assets | Custom Images & Thumbnails | Enhances visual appeal with anime-specific media. | | External APIs | Jikan (MAL Unofficial) | Fetches detailed anime info for /details pages, even without user MAL connection. |
Architecture Overview
AniPub follows a full-stack MVC (Model-View-Controller) architecture, ensuring separation of concerns for maintainability. Here's how it all ties together:
High-Level System Model
The application flows from user requests through the backend to the database, rendering views dynamically.
graph TD
A["User Browser"] -->|HTTP Request| B["Express Server (Node.js)"]
B -->|Auth Check| C["JWT / Google OAuth"]
C -->|Validated| D["MongoDB Database"]
D -->|User Data Fetch| B
B -->|Check Login Status| DEC1{Logged In?}
DEC1 -->|No| JIKAN["Jikan API"]
DEC1 -->|Yes| DEC2{MAL Account Connected?}
DEC2 -->|Yes| MAL["MAL API"]
DEC2 -->|No| JIKAN
JIKAN -->|Anime Details| B
MAL -->|Anime Details| B
B -->|Render| E["EJS Templates"]
E -->|HTML/CSS/JS| A
F["AniPub AI Module"] -->|API Calls| B
subgraph "Frontend"
A
E
end
subgraph "Backend"
B
C
F
DEC1
DEC2
end
subgraph "Data Layer"
D
end
subgraph "External"
JIKAN
MAL
end
- User Browser: Interacts with the UI, sending requests for streaming, searches, or comments.
- Express Server: Acts as the controller, processing requests and orchestrating responses.
- Auth Layer: Validates users via JWT tokens or OAuth, preventing unauthorized access.
- MongoDB: Models data like anime entries (e.g., title, episodes, ratings) and user profiles.
- EJS Templates: Views that dynamically generate HTML based on data from the backend.
- AniPub AI: An integrated module for conversational features.
- Jikan API: Used to fetch anime details for /details pages, regardless of user MAL connection.
Authentication & Session Model
Users can log in manually (email/password) or via Google OAuth. Upon successful login, they receive secure cookies and sessions. If the user connects to MyAnimeList (MAL), an additional MAL-specific session is generated and stored in the database. This session validates the user for fetching, requesting, or modifying data via the MyAnimeList API. If not connected to MAL, no additional session is created, but anime details are still fetched via Jikan API for display purposes.
flowchart LR
Start["User Attempts Login"] --> Method["Manual (Email/Password) or Google OAuth"]
Method --> Auth["Authenticate & Generate JWT"]
Auth -->|Success| Session["Set Secure Cookies & Session"]
Session --> DB["Store Session in MongoDB"]
DB --> App["Grant Access to Core Features"]
subgraph "MAL Connection (Optional)"
Connect["Connect to MAL in Settings"] --> MALAuth["MAL OAuth"]
MALAuth -->|Success| MALSession["Generate MAL-Specific Session"]
MALSession --> DBStore["Store MAL Session & Info in User DB"]
DBStore --> MALSync["Validate & Fetch/Modify MAL Data"]
end
App -->|MAL Connected| MALSync
App -->|Not MAL Connected| Jikan["Use Jikan API for Anime Details"]
subgraph "Error Handling"
Auth -->|Fail| Redirect["Redirect to Login"]
MALAuth -->|Fail| Error["Show Error"]
end
- Secure Cookies & Sessions: Managed via JWT for general authentication, enabling features like chat and multi-device sync.
- MAL-Specific Session: Only for MAL-connected users; allows personalized data sync with MyAnimeList API.
- Jikan Fallback: For all users, provides anime details on /details/animename pages without requiring personal MAL connection.
Data Flow Model
For a typical user action, like watching an episode:
flowchart LR
Start["User Requests Episode"] --> Auth["Authenticate Session/Cookies"]
Auth -->|Success| Fetch["Query MongoDB for Episode Data"]
Fetch --> Stream["Stream Video Content"]
Stream --> Render["Render Player in EJS View"]
Render --> Display["Display in Browser"]
subgraph "Error Handling"
Auth -->|Fail| Redirect["Redirect to Login"]
end
Display --> Interact["User Comments/Rates"]
Interact --> Update["Update DB Ratings/Comments"]
This model ensures efficient, secure data handling with real-time updates.
Secure Chat Model (/chat)
AniPub uses secure sessions for real-time user communication via the /chat endpoint. Here's the flow:
graph TD
A["User 1 Browser"] -->|Login & Session Init| B["Express Server"]
B -->|"Secure Session (HTTPS + JWT + Cookies)"| C["Chat Endpoint (/chat)"]
C -->|Store Messages| D["MongoDB (Chat Collection)"]
A["User 1 Browser
