Skip to content

postnodeal90/abs-react

Repository files navigation

ABS React News Website

A modern, responsive news website built with React and Vite, following the Atomic Design methodology. Inspired by ABS-CBN's news platform, this project showcases best practices in component architecture and responsive web design.

React Vite License

✨ Features

  • Top Story Hero Section - Featured article with large image and headline
  • Article Grid Layout - 2x4 grid displaying article headlines with categories
  • Sub Stories Section - 4-column grid of secondary stories with images
  • Brand News Carousel - Horizontal scrolling sponsored content with navigation arrows
  • Fully Responsive - Optimized for mobile, tablet, and desktop devices
  • Atomic Design Architecture - Scalable and maintainable component structure
  • React Router - Client-side routing for seamless navigation
  • Modern CSS - Custom properties, Grid, Flexbox, and responsive design patterns

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ and npm/yarn installed
  • Git installed

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/abs-react.git
    cd abs-react
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev
  4. Open in browser

    http://localhost:5173
    

Build for Production

npm run build
npm run preview

πŸ“ Project Structure

abs-react/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ atoms/          # Basic building blocks
β”‚   β”‚   β”‚   β”œβ”€β”€ Button/
β”‚   β”‚   β”‚   β”œβ”€β”€ CategoryTag/
β”‚   β”‚   β”‚   β”œβ”€β”€ Container/
β”‚   β”‚   β”‚   β”œβ”€β”€ Heading/
β”‚   β”‚   β”‚   β”œβ”€β”€ Image/
β”‚   β”‚   β”‚   β”œβ”€β”€ Input/
β”‚   β”‚   β”‚   β”œβ”€β”€ Label/
β”‚   β”‚   β”‚   └── Text/
β”‚   β”‚   β”œβ”€β”€ molecules/      # Simple component groups
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleCard/
β”‚   β”‚   β”‚   β”œβ”€β”€ BrandNewsCard/
β”‚   β”‚   β”‚   β”œβ”€β”€ Card/
β”‚   β”‚   β”‚   β”œβ”€β”€ FormField/
β”‚   β”‚   β”‚   β”œβ”€β”€ SearchBar/
β”‚   β”‚   β”‚   └── SubStoryCard/
β”‚   β”‚   β”œβ”€β”€ organisms/      # Complex component sections
β”‚   β”‚   β”‚   β”œβ”€β”€ BrandNewsSection/
β”‚   β”‚   β”‚   β”œβ”€β”€ ContactForm/
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer/
β”‚   β”‚   β”‚   β”œβ”€β”€ Header/
β”‚   β”‚   β”‚   β”œβ”€β”€ NewsGrid/
β”‚   β”‚   β”‚   β”œβ”€β”€ SubStoriesGrid/
β”‚   β”‚   β”‚   └── TopStory/
β”‚   β”‚   └── templates/      # Page layouts
β”‚   β”‚       └── MainLayout/
β”‚   β”œβ”€β”€ pages/              # Complete pages
β”‚   β”‚   β”œβ”€β”€ BrandNewsPage/
β”‚   β”‚   β”œβ”€β”€ ContactPage/
β”‚   β”‚   └── HomePage/
β”‚   β”œβ”€β”€ data/               # Static data
β”‚   β”‚   └── topStoryData.json
β”‚   β”œβ”€β”€ styles/             # Global styles
β”‚   β”‚   β”œβ”€β”€ tokens.css
β”‚   β”‚   └── global.css
β”‚   β”œβ”€β”€ App.jsx
β”‚   └── main.jsx
β”œβ”€β”€ public/
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.js
└── README.md

🧩 Atomic Design Methodology

This project follows the Atomic Design pattern:

Atoms πŸ”Ή

Basic building blocks (buttons, inputs, headings, images)

Molecules πŸ”Έ

Simple component groups (article cards, form fields, search bars)

Organisms πŸ”Ά

Complex sections (header, footer, news grids, carousels)

Templates πŸ”·

Page layouts and structure

Pages πŸ”΅

Complete pages with real content

πŸ› οΈ Tech Stack

  • React 18.2.0 - UI library
  • Vite 5.0.8 - Build tool and dev server
  • React Router 6.20.0 - Client-side routing
  • CSS3 - Styling with custom properties, Grid, and Flexbox
  • ESLint - Code linting and quality

🎨 Key Components

HomePage

Main landing page featuring:

  • News Grid (Top Story + Article Headlines)
  • Sub Stories Grid
  • Brand News Section

BrandNewsPage

Dedicated page displaying all brand news items in a 2x4 responsive grid

NewsGrid

50/50 split layout with Top Story on the left and article headlines in a 2x4 grid on the right

BrandNewsSection

Horizontal scrolling carousel with:

  • Navigation arrows
  • Sponsored content cards
  • Responsive design

πŸ”§ Path Aliases

The project uses convenient path aliases for clean imports:

import Button from '@atoms/Button';
import ArticleCard from '@molecules/ArticleCard';
import Header from '@organisms/Header';
import MainLayout from '@templates/MainLayout';
import HomePage from '@pages/HomePage';

Configured aliases:

  • @ β†’ /src
  • @atoms β†’ /src/components/atoms
  • @molecules β†’ /src/components/molecules
  • @organisms β†’ /src/components/organisms
  • @templates β†’ /src/components/templates
  • @pages β†’ /src/pages
  • @utils β†’ /src/utils
  • @styles β†’ /src/styles

🌐 Available Routes

  • / - Home page
  • /contact - Contact page
  • /brand-news - All brand news items

πŸ“± Responsive Breakpoints

  • Mobile: < 576px
  • Tablet: 576px - 1024px
  • Desktop: > 1024px

🀝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

πŸ“„ License

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

πŸ™ Acknowledgments

πŸ“§ Contact

For questions or feedback, please open an issue on GitHub.


Made with ❀️ using React and Atomic Design

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors