Skip to content

Patch Update: v0.1.5-alpha

Latest
Compare
Choose a tag to compare
@mzcoder-hub mzcoder-hub released this 20 Jul 08:27
· 6 commits to main since this release
1c2d98c

Patch Update: v0.1.5-alpha

Date: July 20, 2024

Overview

This patch update includes several improvements, bug fixes, and new features to enhance the functionality and user experience of the Multi-Timeline CMS.

Changes and Improvements

Authentication

  • Feature: Added user authentication and authorization.
    • Implemented login, register, and logout functionalities.
    • Protected routes using ProtectedRoute component.
    • Middleware to verify JWT tokens in backend routes.

Backend

  • Routes:
    • Added authentication routes in routes/auth.js.
    • Updated content routes in routes/content.js.
    • Updated timeline routes in routes/timelines.js.
  • Middleware:
    • Added auth.js middleware to verify JWT tokens.

Frontend

  • Components:
    • Added Register.js for user registration.
    • Added Login.js for user login.
    • Updated App.js to use ProtectedRoute for authenticated routes.
  • Context:
    • Added AuthContext.js for managing authentication state.

Bug Fixes

  • Fixed an issue with the auth.js middleware causing errors when reading the Authorization header.
  • Fixed maximum update depth exceeded error in AuthContext.js.

API Endpoints

Authentication

  • POST /api/auth/register - Register a new user.
  • POST /api/auth/login - Login and get a token.
  • POST /api/auth/logout - Logout the user.

Timelines

  • 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.

Content

  • 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.

Notes

  • Ensure to update the environment variables in your .env file to include JWT_SECRET for JWT authentication.
  • Run the backend server on http://localhost:5000 and the frontend development server on http://localhost:3000.

Contributors

Additional Information

For detailed information on the project, please refer to the README.

License

This project is licensed under the MIT License. See the LICENSE file for details.