Skip to content

A lightweight authentication API built with Node.js and Express, featuring ๐Ÿ“ Signup and ๐Ÿ”‘ Signin endpoints. This project demonstrates API handling, request/response validation, and โšก in-memory user storage. Fully tested using Postman ๐Ÿงช.

License

Notifications You must be signed in to change notification settings

krittikabiswas/Simple-Auth-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Simple Auth API

Node.js โ€ข Express โ€ข Postman ๐Ÿงช


๐Ÿ” Simple Authentication API

A lightweight authentication API built using Node.js and Express, featuring ๐Ÿ“ Signup and ๐Ÿ”‘ Signin endpoints. This project of mine demonstrates API handling, request/response validation, and โšก in-memory user storage. All endpoints are tested using Postman ๐Ÿงช, making it ideal for interviews or beginners learning backend basics.


๐Ÿš€ Features

  • ๐Ÿ“ User Signup
  • ๐Ÿ”‘ User Signin
  • ๐Ÿง  In-memory user storage (no database)
  • ๐Ÿ“ฎ Proper request/response handling
  • ๐Ÿงช Postman tested
  • โ— Basic validation included

๐Ÿ› ๏ธ Tech Stack

  • Node.js
  • Express.js
  • Postman (for API testing)

๐Ÿ“ฆ Installation & Setup

# Clone the repo
git clone https://github.com/your-username/your-repo.git

# Navigate into the project
cd your-repo

# Install dependencies
npm install

# Start the server
node index.js

๐Ÿ“ก API Endpoints

๐Ÿ“ POST /signup

Create a new user.

Request Body

{
  "username": "yourname",
  "password": "yourpassword"
}

Responses

  • 201 โ€“ User created successfully
  • 400 โ€“ Username already exists / invalid input

๐Ÿ”‘ POST /signin

Authenticate an existing user.

Request Body

{
  "username": "yourname",
  "password": "yourpassword"
}

Responses

  • 200 โ€“ Signin successful
  • 401 โ€“ Invalid username or password

๐Ÿงช Testing with Postman

  • Open Postman
  • Create POST requests for /signup and /signin
  • Send JSON request bodies
  • Verify responses & status codes

๐Ÿ“ฌ Postman Collection

You can import the Postman collection that I made to test the API endpoints:

File: postman\Webhibe Assignment.postman_collection.json

It contains:

  • POST /signup
  • POST /signin

๐Ÿ“„ License

This project is open-source under the BSD 2-Clause License.

๐Ÿฉต Author

Krittika Biswas Made as an assignment for Webhibe

About

A lightweight authentication API built with Node.js and Express, featuring ๐Ÿ“ Signup and ๐Ÿ”‘ Signin endpoints. This project demonstrates API handling, request/response validation, and โšก in-memory user storage. Fully tested using Postman ๐Ÿงช.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published