Check out Headline Hunter, a cool news site that brings together stories from lots of different sources and puts them all in one place. We use ChatGPT to allow you to summarize each article, so you can stay informed even when you're in a hurry!
- Implemented a user-friendly interface that displays a variety of news articles, allows users to save categories or articles, and generates smart summaries for articles using AI.
- Utilized Prisma and PostgreSQL to store user preferences, favorites, and saved articles, ensuring a seamless user experience across multiple devices.
- Integrated NextAuth to provide secure authentication and authorization for users, including social login options.
- Utilized Typescript to improve the codebase's readability, maintainability, and scalability.
| Category | Technologies (non extensive) |
|---|---|
| Languages | Typescript, and Javascript |
| Libraries and Frameworks | NextJS, React, NextAuth, MaterialUI, Date-FNS, Axios, UUID, Docker, and Railway |
| External APIs | NewsAPI, WeatherAPI, and OpenAI's ChatGPT API |
| Database and ORM | PostgreSQL, Prisma |
- Learning SQL and Prisma to store user data in a PostgreSQL database was a challenge since these were all new technologies for me, but it was a great learning experience. I found creating relationships between my tables to be very effective in storing and retrieving data.
- I needed to create a system where we made sure we had up to date articles without making too many API calls. I created a check based on the category and controlled how often we would make an API call to get new articles.
- Pagination was a challenge. I needed a way to create a "endless" load more button that would load more articles or categories. I had to change the fundamental way I was fetching data from my backend to make this work.
To get this app up and running, you'll need to set up a few things in your .env file. Specifically, make sure to include the following environments and variables:
- DATABASE_URL (We use PostgreSQL + Prisma), GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, NEXTAUTH_SECRET, and NEXTAUTH_URL, NEWS_API_KEY, WEATHER_API_KEY, OPEN_AI_KEY, NEXT_PUBLIC_IS_TEST_ENV
# Clone this repository
git clone https://github.com/rcamach7/headline-hunter
cd headline-hunter
# Run local server
yarn install
yarn dev