LNCrawler is a web application for reading and managing light novels. It consists of a Django-based API backend and a React-based frontend, containerized using Docker. LNCrawler use the lightnovel-crawler project by dipudb as a base to allow a downloading feature on the website, allowing users to add novels to the website automatically.
The project is a rewrite of the original lightnovel-crawler-website react branch by jere344. It is still still in very early stages of development.
lncrawler/
├── dipudb-lncrawler-jere344-patches/ # The lightnovel-crawler project with minor patches allowing it to work with the current version of LNCrawler
├── lncrawler-api/ # Django backend API
├── lncrawler-frontend/ # React frontend application
├── docker-compose.yml # Docker Compose configuration
└── README.md # This file
- Browse and read light novels.
- Add novels to the website using the lightnovel-crawler project.
- User-configurable reader settings (font size, color, margins, etc.).
- Chapter navigation and preloading.
- Comment section for chapters.
- Admin panel for managing novels and users.
- Backend: Django, Django REST framework
- Frontend: React, Vite, TypeScript, Material-UI
- Database: PostgreSQL
- Containerization: Docker, Docker Compose
- Docker
- Docker Compose (usually included with Docker Desktop)
-
Clone the repository and submodule (if you haven't already):
git clone https://github.com/jere344/LNCrawler.git --recurse-submodules cd lncrawler -
Review Environment Variables: Open
docker-compose.ymland review the environment variables for theapiandfrontendservices. Key variables to note:SITE_URL,SITE_API_URL(forapiservice)VITE_API_BASE_URL(forfrontendservice)POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORD(fordbandapiservices)DJANGO_SUPERUSER_USERNAME,DJANGO_SUPERUSER_PASSWORD(forapiservice)SECRET_KEY(forapiservice - important to change for production)
-
Build and run the containers: From the root directory of the project (
lncrawler/), run:docker-compose up -d --build
This command will build the images for the API and frontend services and start all services (database, API, frontend) in detached mode.
-
To stop the services:
docker-compose down
Once the services are running:
- Frontend Application: Open your browser and navigate to
http://localhost:8185(or the adress you configured forfrontend). - API: The API will be accessible at
http://localhost:8186(or the adress you configured forapi). - Django Admin Panel: Navigate to
http://localhost:8186/admin.- Default credentials (from
docker-compose.yml):- Username:
admin - Password:
admin
- Username:
- You can change these credentials via the admin panel after logging in or by modifying the
DJANGO_SUPERUSER_USERNAMEandDJANGO_SUPERUSER_PASSWORDenvironment variables and restarting theapiservice.
- Default credentials (from
Key environment variables are defined in the docker-compose.yml file for each service.
SITE_URL: Frontend URL (e.g.,http://localhost:8185)SITE_API_URL: API URL (e.g.,http://localhost:8186)CORS_ORIGIN_WHITELIST: Comma-separated list of allowed origins for CORS.ALLOWED_HOSTS: Comma-separated list of allowed hostnames for Django.SECRET_KEY: Django secret key. Change this for any production deployment.DEBUG: Set toTruefor development,Falsefor production.CORS_ALLOW_ALL_ORIGINS: Set toTruefor development,Falsefor production (useCORS_ORIGIN_WHITELISTinstead).DJANGO_SUPERUSER_USERNAME,DJANGO_SUPERUSER_EMAIL,DJANGO_SUPERUSER_PASSWORD: Credentials for the initial superuser.POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_HOST,POSTGRES_PORT: Database connection details.
VITE_API_BASE_URL: The base URL for the API that the frontend will connect to (e.g.,http://localhost:8186).
POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORD: Database credentials.
Note: For production environments, it is highly recommended to use more secure methods for managing secrets and configurations, such as Docker secrets or environment-specific configuration files not committed to the repository.
Contributions are welcome! Please feel free to submit pull requests or open issues.