This is a simple CMS (Content Management System) for managing multiple timelines. It includes functionalities for adding, editing, viewing, and deleting timelines and their associated content. The project is built using React for the frontend and Node.js with Express for the backend, and it uses SQLite as the database.
- Add, Edit, View, Delete Timelines
- Add, Edit, View, Delete Content within Timelines
- Upload and Download Files for Content
- Display Overdue and Upcoming Timelines
- User Authentication and Authorization
- React
- Formik for form handling
- Bootstrap for styling
- React DataTable Component for listing data
- Node.js
- Express
- SQLite
- Node.js and npm installed on your machine
-
Clone the repository
git clone https://github.com/yourusername/multi-timeline-cms.git cd multi-timeline-cms
-
Install dependencies for the backend
cd server npm install
-
Install dependencies for the frontend
cd ../client npm install
The project uses SQLite as the database. The database file will be created automatically when you run the backend server for the first time.
-
Start the backend server
cd server npm start
The backend server will start on http://localhost:5000.
-
Start the frontend development server
cd ../client npm start
The frontend development server will start on http://localhost:3000.
- GET /api/timelines - Get all timelines
- GET /api/timelines/:id - Get a specific timeline by ID
- POST /api/timelines - Create a new timeline
- PUT /api/timelines/:id - Update a specific timeline by ID
- DELETE /api/timelines/:id - Delete a specific timeline by ID
- GET /api/timelines/overdue - Get all overdue timelines
- GET /api/timelines/upcoming - Get all upcoming timelines
- GET /api/content/:timelineId - Get all content for a specific timeline
- POST /api/content - Create new content
- PUT /api/content/:id - Update a specific content by ID
- DELETE /api/content/:id - Delete a specific content by ID
- POST /api/auth/register - Register a new user
- POST /api/auth/login - Login and get a token
- POST /api/auth/logout - Logout the user
server.js
- Main entry point of the backend serverroutes/timelines.js
- Routes for timeline-related endpointsroutes/content.js
- Routes for content-related endpointsroutes/auth.js
- Routes for authenticationmiddleware/auth.js
- Middleware for verifying tokensdatabase.js
- Database setup and connection
src/App.js
- Main component and entry point for the frontendsrc/components/OverdueTimelines.js
- Component for displaying overdue timelinessrc/components/UpcomingTimelines.js
- Component for displaying upcoming timelinessrc/components/Register.js
- Component for user registrationsrc/components/Login.js
- Component for user loginsrc/components/ProtectedRoute.js
- Component for protected routessrc/AuthContext.js
- Context for authentication
If you wish to contribute to this project, please fork the repository and submit a pull request. Contributions are welcome!