Logo Lanfrica

Kutola/datafeed-kenya-frontend

Record type:

software
Creator:
Kut
Host:
# DataFeed Kenya — Frontend The face of the operation. Built with Next.js so fast it'll make your head spin. While the backend was busy handling JWT tokens and database migrations like a seasoned bouncer, this frontend was out here making sure Kenyan journalism actually *looks* good on the internet. ## What It Does - Displays news articles fetched straight from the DataFeed Kenya API - Lets journalists log in, publish, edit, and delete their stories - Protects the dashboard so random people can't mess with your articles - Loads articles server-side so Google actually knows we exist ## Tech Stack Next.js 15: The framework. App Router. Server components. The whole shebang. TypeScript: JavaScript but with trust issues (in a good way) Tailwind CSS v4: Dark mode. Orange accents. Looks like a real news site now. Next/Image: Compresses images so your slow internet doesn't suffer ## Pages / → Homepage — all articles, latest first, server-rendered /articles/[id] → Single article — full story with author and timestamp /login → Journalist login — JWT token stored in localStorage /dashboard → Protected — redirects strangers to /login /dashboard/create → Write and publish a new article ## Getting Started **1. Clone the repo** ```bash git clone github.com cd datafeed-kenya-frontend ``` **2. Install dependencies** ```bash npm install ``` **3. Set up environment variable** Create a `.env.local` file: ```env NEXT_PUBLIC_API_URL=127.0.0.1 ``` Make sure the DataFeed Kenya backend is running on port 8000 or this will be a very empty news site. **4. Run the dev server** ```bash npm run dev ``` Visit `localhost` and try not to be impressed. --- ## Project Structure ``` newsfeed-kenya-fronted/ ├── app/ │ ├── components/ │ │ └── Navbar.tsx ← sticky nav with auth-aware links │ ├── articles/ │ │ └── [id]/ │ │ └── pa …