This is a web application for managing articles. It allows administrators to create, update, and delete articles, while regular users for now can only read articles.
The Article Management System is designed to facilitate the creation and management of articles by both regular users and administrators. Regular users can create an account, log in, and create new articles. On the other hand, administrators have access to the admin dashboard, where they can manage articles and users.
The main features of the Article Management System include:
- Admin Dashboard: The application provides an admin dashboard that allows administrators to manage articles.
- Create, Update, Delete: Administrators can create new articles, update existing articles, and delete articles as needed.
- Read-only for Users: Regular users can access and read articles but do not have permission to perform any modifications.
The server of this website is hosted on a serverless function, which may result in longer loading times at the beginning. So just wait a few seconds for the server to start and if you don't get any posts just press F5
This is how user posts are displayed on the website. Users can view and read articles created by other users.
Even unregistered users can access and read articles on the website.
Admin users have additional privileges and can manage articles and users from the admin dashboard.
During the registration process, an additional "Is Admin" checkbox is provided. To become an administrator, check this box during registration. Only users with the "Is Admin" checkbox checked will have access to the admin dashboard and the ability to perform CRUD operations on articles.
- Frontend: The frontend is built using React with Material-UI for the user interface.
- Backend: The backend is developed with Node.js and Express.js, providing the API endpoints for managing articles and user authentication.
- Database: MongoDB is used as the database to store article data and user information.
The Article Management System is equipped with a feature to integrate RSS feeds. The application fetches articles from an external RSS feed and stores them in the database on a daily schedule. This allows users to access the latest articles from the external source within the system.
- The backend server uses the
rss-parser
library to fetch articles from an external RSS feed. The feed URL can be configured in the backend settings. - A schedule is set up using
cron
to fetch articles from the RSS feed once a day at a specified time, ensuring the data remains up-to-date. - The fetched articles are then stored in the MongoDB database as new articles in the system.
To run the Article Management System locally, ensure you have the following prerequisites:
- Node.js (Version 14 or higher)
- npm (Version 6 or higher)
- MongoDB (Version 4 or higher)
Follow the steps below to set up the project:
- Clone the repository:
git clone https://github.com/your-username/article-management-system.git
- Install the required dependencies for frontend and backend:
npm install
- Set up environment variables:
Create a .env
file in the backend
directory with the following content:
URI=your-mongodb-connection-string
TOKEN_KEY=your-secret-key // example: jllgshllWEUJHGHYJkjsfjds90JKLHKJDFH2L341234
PORT=your-port
Replace your-mongodb-connection-string
with your MongoDB connection string, and your-secret-key
with a secure secret key for JWT authentication.
-
Start the development server:
-
Clone the repository to your local machine:
git clone https://github.com/your-username/article-management-system.git`
- Navigate to the backend directory and install dependencies:
cd backend
npm install`
- Start the backend server:
npm run start:dev
- Navigate to the frontend directory and install dependencies:
bashCopy code
cd ../frontend
npm install`
- Start the frontend application:
npm run dev
- Register as a new user and check the "Is Admin" checkbox to become an administrator.
- Log in with your credentials.
- As an admin, access the admin dashboard from the navigation menu.
- In the admin dashboard, you can create, update, and delete articles as needed.
- Regular users can access articles from the homepage but will not have access to any administrative functions.
The Article Management System uses a RESTful API to interact with the backend. For API documentation, refer to the openapi.yaml
file in the backend
directory.
The application uses MongoDB as the database to store articles, user information, and other data. The MongoDB connection URI is specified in the .env
file.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to contribute to this project by submitting bug reports, feature requests, or pull requests.
For any questions or feedback, please contact sashalischinskiy72@gmail.com.
Happy managing your articles!