← BACK

BlogCrawler

TypeScript ⭐ 0

BlogCrawler 🕸️

A NestJS-based backend application for crawling and managing blog content, integrated with Supabase for authentication and PostgreSQL via TypeORM for data persistence.

NestJS
TypeScript
TypeORM
Supabase

Table of Contents 📜

Introduction 👋

BlogCrawler is a server-side application built with NestJS, designed to crawl and manage blog posts. It leverages TypeORM for database interactions with PostgreSQL and integrates with Supabase for user authentication. The project is structured to provide a robust backend for applications requiring content management and user authentication features.

Features ⭐

  • User Authentication: Secure sign-up and sign-in functionality powered by Supabase. 🔐
  • Blog Post Management: API endpoints for fetching blog posts, with support for filtering by tags and pagination.
  • Tagging System: Ability to categorize blog posts using tags.
  • Database Persistence: Utilizes TypeORM with PostgreSQL for reliable data storage.
  • Environment Configuration: Manages application settings through environment variables.
  • Testing: Includes unit and end-to-end tests for verifying application functionality.

Tech Stack 💻

  • Framework: NestJS
  • Language: TypeScript
  • Database: PostgreSQL
  • ORM: TypeORM
  • Authentication: Supabase
  • Deployment: Node.js
  • Other Dependencies: class-validator, class-transformer, rxjs, reflect-metadata
  • Development Tools: ESLint, Prettier, Jest, SWC

Installation 🔧

  1. Clone the repository:

    git clone https://github.com/phambaophuc/BlogCrawler.git
    cd BlogCrawler
    
  2. Install dependencies:

    npm install
    
  3. Set up environment variables:
    Create a .env file in the root directory and populate it with your database and Supabase credentials:

    # .env
    APP_PORT=3000
    NODE_ENV=development
    
    DB_HOST=localhost
    DB_PORT=5432
    DB_USERNAME=your_db_username
    DB_PASSWORD=your_db_password
    DB_DATABASE=your_db_name
    
    SUPABASE_URL=your_supabase_url
    SUPABASE_KEY=your_supabase_key
    

Usage 🚀

Once installed and configured, you can start the application:

  • Development (with watch mode):

    npm run start:dev
    
  • Production:
    First, build the project:

        npm run build
    

    Then, run the production server:

        npm run start:prod
    

How to use 🤔

This project serves as a backend API for blog-related functionalities. It can be used to power a frontend blog application that requires:

  1. User Management: Allow users to register and log in.
  2. Content Display: Fetch and display blog posts, potentially filtered by tags.
  3. Content Organization: Utilize tags to categorize and organize posts.

Developers can integrate this backend API into their frontend projects (e.g., using React, Vue, Angular) to build a complete blogging platform.

License 💰

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

Footer ✉️

© 2023 BlogCrawler. All rights reserved.

Feel free to fork, star ⭐, and open issues if you encounter any problems or have suggestions!