Article Tracker is a web application that allows you to track articles you have read. You can add articles by entering their URLs, and the application will validate the URLs before saving them. You can also delete articles from the list.
- Add articles by entering their URLs.
- Automatically add
https://if the URL does not include a protocol. - Validate URLs by making an HTTP request to check if they are accessible.
- Fetch and display the favicon of the entered URL.
- Display the list of articles with the visit date.
- Convert listed URLs to clickable links.
- Delete articles from the list.
- Display the total count of articles read.
- Display the count of articles read on a selected date.
- Scrollable list of articles when there are multiple entries.
- Navigate through dates using back and forward buttons.
-
Clone the repository:
git clone https://github.com/your-username/article-tracker.git cd article-tracker -
Navigate to the backend directory and install dependencies:
cd backend npm install -
Navigate to the frontend directory and install dependencies:
cd ../frontend npm install -
Create a
.envfile in thefrontenddirectory with the following content:REACT_APP_API_URL=http://localhost:5005
-
Start the backend server:
cd backend npm run dev -
Start the frontend development server:
cd ../frontend npm start -
Open your browser and navigate to
http://localhost:3000to use the application.
You can also run the application using Docker and Docker Compose.
-
Build and start the containers:
docker-compose up --build
-
Open your browser and navigate to
http://localhost:3000to use the application.
POST /api/articles: Add a new article.GET /api/articles: Get the list of articles.GET /api/articles/count: Get the total count of articles.DELETE /api/articles/:id: Delete an article by ID.
ArticleInput: Component for entering and saving article URLs.ArticleCounter: Component for displaying the total count of articles read.ArticleList: Component for displaying the list of articles with visit dates, favicons, clickable links, and delete buttons.
articleModel.js: Mongoose model for articles.articleController.js: Controller for handling article-related operations.articleRoutes.js: Express routes for article-related endpoints.
This project is licensed under the MIT License.
To update the application when using Docker, follow these steps:
-
Pull the latest changes from the repository:
git pull origin main
-
Rebuild the Docker images:
docker-compose build
-
Restart the Docker containers:
docker-compose up -d
