Welcome to the User Authentication with Server-Side Rendering (SSR) repository! This project aims to provide a secure and seamless authentication system for web applications, utilizing server-side rendering for enhanced performance and user experience.
- Secure Authentication: Implement robust authentication mechanisms to ensure user data security and prevent unauthorized access.
- Server-Side Rendering (SSR): Utilize SSR to render pages on the server before sending them to the client, enhancing performance and SEO.
- User Profile Management: Allow users to create accounts, log in securely, and manage their profiles.
- Session Management: Implement session management to maintain user sessions and provide a seamless browsing experience.
- Password Hashing: Securely hash user passwords using bcrypt to protect sensitive information.
- Middleware-based Authentication: Use middleware functions to authenticate user requests and restrict access to protected routes.
- Node.js: Backend JavaScript runtime environment.
- Express.js: Web application framework for Node.js.
- MongoDB: NoSQL database for storing user data.
- Mongoose: MongoDB object modeling for Node.js.
- JWT (JSON Web Tokens): Secure method for transmitting information between parties as JSON objects.
- bcrypt: Library for hashing passwords.
- Handlebars (hbs): Templating engine for rendering dynamic HTML content.
- dotenv: Environment variable management.
- cookie-parser: Middleware for parsing cookies in Express.
- nodemon: Utility for auto-restarting the server during development.
To get started with the project, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/subhranil002/User-Authentication-SSR.git
-
Install dependencies:
-
cd User-Authentication-SSR
-
npm install
-
-
Set up environment variables:
- Create a
.env
file in the root directory. - Define environment variables such as
PORT
,MONGO_URI
, andJWT_SECRET
.
- Create a
-
Start the development server:
npm start
-
Visit
http://localhost:3000
in your web browser to access the application.
Contributions are welcome! Feel free to open issues for feature requests, bug fixes, or general improvements. If you'd like to contribute code, please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License.
Made With ❤️