Daily Snippets is a web application that serves a variety of daily content, including quotes, jokes, trivia, and more. It uses the API Ninjas API to fetch content dynamically.
- Displays daily snippets such as quotes, facts, jokes, trivias and riddles.
- Fetches content using API from API Ninjas.
- Built with Next.js for fast performance and dynamic rendering.
- Next.js: A React framework for building static and dynamic websites.
- Axios: For making HTTP requests.
- React Query: For managing server state and fetching data.
- Next Themes: To support dark and light modes.
-
Clone the repository:
git clone https://github.com/dwiwijaya/daily-snippets.git
-
Install dependencies:
cd daily-snippets npm install -
Create a .env.local file in the root of the project and add the following variable:
NEXT_PUBLIC_NINJA_API_KEY=your-api-key
-
Run the application:
npm run dev
-
Visit the app at
http://localhost:3000.
- The application will display a new snippet each day, fetched from the API.
- It includes quotes, jokes, trivia, and other fun facts.
- Fork the repository.
- Create a new branch (
git checkout -b feature-name). - Commit your changes (
git commit -am 'Add feature'). - Push to your branch (
git push origin feature-name). - Open a pull request.
This project is open-source and available under the MIT License.