Skip to content

Latest commit

 

History

History
169 lines (136 loc) · 4.23 KB

README.md

File metadata and controls

169 lines (136 loc) · 4.23 KB

Gober build status

Gober (Go Berita)

Gober, stands for Go Berita, is a monorepo project for aggregating news/article from various websites.

  • Backend: Written in Go, provides REST APIs for scraping and fetching news articles.
  • Frontend: Built with Vue.js, displays the news in an elegant, user-friendly web interface.

Features

  • Scrape popular articles from multiple websites (e.g., detik.com, kompas.com).
  • Search articles by keyword. (WIP)
  • Fetch article details with enriched content links.
  • Responsive frontend design for desktop and mobile.

Available Sites

Sites Status Query Param Origin
detik.com ?source=detik 🇮🇩
kompas.com ?source=kompas 🇮🇩
tribunnews.com 🔜 ?source=tribun 🇮🇩
cnnindonesia.com 🔜 ?source=ccnid 🇮🇩

Legend:

  • ✅: Up
  • ❌: Need Fix
  • 🔜: Coming Soon

Tech Stack

Backend

  • Go (Golang)
  • Gin Web Framework
  • goquery (for web scraping)
  • Mockable HTTP client for testing

Frontend

  • Vue.js
  • Axios (for API calls)
  • CSS Grid and Flexbox for responsive layouts

Getting Started

Prerequisites


Setup Instructions using make

1. Clone the Repository

git clone https://github.com/your-username/gober.git
cd gober

2. Run make file

make serve

Setup Instructions (Separate BE and FE)

1. Clone the Repository

git clone https://github.com/your-username/gober.git
cd gober

2. Backend (Go)

Step-by-step:

  1. Navigate to the root directory (if not already there):

    cd gober
  2. Install dependencies:

    go mod tidy
  3. Run the backend server:

    go run main.go
  4. API Endpoints:
    The server will run at http://localhost:8080. You can access the following endpoints:

    • Get popular articles: /articles/popular?source=detik
    • Search articles: /articles?source=detik&q=keyword
    • Get article details: /article?detailUrl=encoded_url

    See Available Sites for source.


3. Frontend (Vue.js)

Step-by-step:

  1. Navigate to the web directory:
    cd web
  2. Install dependencies:
    npm install
  3. Run the development server:
    npm run dev
  4. Open your browser and visit http://localhost:8001 to view the web application.

Project Structure

gober/
├── parsers/                # Parsers for different news websites
├── models/                 # Data models
├── utils/                  # Utilities (e.g., HTTP client, helper functions)
├── main.go                 # Entry point for the backend server
├── web/                    # Frontend codebase (Vue.js)
│   ├── src/                # Source code
│   │   ├── components/     # Vue components
│   │   ├── views/          # Application views
│   │   └── assets/         # Static assets (CSS, images, etc.)
├── go.mod                  # Backend dependencies file
├── go.sum                  # Backend dependency checksums
├── README.md               # Project documentation
└── .gitignore              # Ignored files for Git

Testing

Backend Testing

  1. Navigate to the root directory:
    cd gober
  2. Run tests:
    go test ./...

Contributing

We welcome contributions!

  • Fork the repository
  • Create a new branch (feature/my-feature)
  • Submit a pull request

License

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