Skip to content

Twitter Backend: A Node.js project that simulates the backend functionality of Twitter, including user management, tweets, and passwordless authentication using SendGrid and JWT tokens.

Notifications You must be signed in to change notification settings

saad662/twitter-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Backend

Twitter Backend Logo

Overview

Welcome to the Twitter Backend project! This Node.js application aims to resemble the backend functionality of the popular social media platform Twitter. It provides essential features for users, tweets, and authentication.

Table of Contents

  1. Installation
  2. Usage
  3. Configuration
  4. Routes
  5. Middleware
  6. Dependencies
  7. Contributing
  8. License

Installation

To get started with the Twitter Backend project, follow these steps:

  1. Clone the repository:
git clone https://github.com/saad662/twitter-backend.git
  1. Navigate to the project directory:
cd twitter-backend
  1. Install the project dependencies:
npm install

Usage

To run the Twitter Backend application, use the following command:

npm run dev

This command starts the development server using nodemon and listens on http://localhost:3000. You can access the application by opening this URL in your web browser or making API requests.

Configuration

The project includes a config folder where you can configure various settings. Make sure to update these configurations according to your requirements:

  • config/authConfig.ts: Configure your secret key for JSON Web Tokens (JWT) and other authentication settings.
  • config/sendgridConfig.ts: Configure your SendGrid API key for sending email notifications.

Routes

The Twitter Backend project includes the following API routes:

  • /user: User-related endpoints.
  • /tweet: Tweet-related endpoints.
  • /auth: Authentication-related endpoints.

You can find the route definitions in the respective route files located in the routes folder.

Middleware

The application uses middleware for authentication. The authenticateToken middleware is applied to routes that require authentication. You can find this middleware in the middlewares/authMiddleware.ts file.

Dependencies

The project uses several dependencies, which are listed in the package.json file:

Production Dependencies:

Development Dependencies:

Contributing

If you'd like to contribute to this project, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix: git checkout -b feature/your-feature-name or git checkout -b bugfix/your-bug-fix.
  3. Make your changes and commit them: git commit -m "Your commit message here".
  4. Push your changes to your fork: git push origin feature/your-feature-name.
  5. Open a pull request to the main branch of the original repository.

License

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


Thank you for using Twitter Backend! If you have any questions or encounter any issues, please feel free to open an issue. Happy coding!

About

Twitter Backend: A Node.js project that simulates the backend functionality of Twitter, including user management, tweets, and passwordless authentication using SendGrid and JWT tokens.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published