
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:
-
Navigate to the root directory (if not already there):
cd gober
-
Install dependencies:
go mod tidy
-
Run the backend server:
go run main.go
-
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:
- Navigate to the
web
directory:
cd web
- Install dependencies:
npm install
- Run the development server:
npm run dev
- 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
- Navigate to the root directory:
cd gober
- 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.