A blogging platform to share your insights and expertise with others.
- User Registration: Users can sign up for an account by providing basic information such as username, email, and password.
- User Login: Registered users can log in securely using their credentials.
- JWT Authentication: JSON Web Tokens (JWT) are used for secure authentication and authorization of users.
- Create Articles: Authenticated users can create new articles by providing title, content, and other relevant information.
- Read Articles: Users can view articles created by themselves and other users.
- Update Articles: Authors can edit and update their articles to keep them current and accurate.
- Delete Articles: Authors have the ability to delete their own articles if needed.
- Password Hashing: User passwords are securely hashed before storing them in the database to ensure confidentiality.
- HTTPS: Communication between the client and server is encrypted using HTTPS to prevent eavesdropping and man-in-the-middle attacks.
- Cross-Origin Resource Sharing (CORS) is properly configured to allow restricted resources on a web page to be requested from another domain outside the domain from which the resource originated.
- Component Testing: Components of the application are thoroughly tested to ensure their functionality and reliability.
- Unit Testing: Individual units of code are tested in isolation to validate their correctness.
- Node.js
- Express.js
- Mongo DB
- Jest
- Vitest
This project follows Conventional Commits message and Model–view–controller design pattern
Contributions are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull request with your changes.
-
Clone the repository.
-
Install dependencies for both api and client:
npm install
//frontend VITE_BASE_API=(eg. http://localhost:5555/) //backend DB_URI=(eg. mongodb://127.0.0.1:27017/) SALT=(eg. 10) ACCESS_TOKEN_SECRET=(eg. secret)
-
Set up environment variables such as database connection string, JWT secret key, etc.
-
Start the server:
npm start
-
Start the frontend development server:
npm start