User-Login-Interface-npm-Package Tailwind Templates

User Login Interface Npm Package

A modular authentication system providing both backend (Express, MongoDB) and frontend (React, Tailwind CSS) authentication components.

ULI-Auth (User Login Interface)

A modular authentication system providing both backend (Express, MongoDB) and frontend (React, Tailwind CSS) authentication components.

🚀 Installation

npm install uli-auth-backend uli-auth-frontend

🛠 Usage Example

Backend (Express)

const express = require("express");
const createAuthApp = require("uli-auth-backend");

const app = express();
const authApp = createAuthApp({ mongoURI: "mongodb://localhost:27017/mydb", routePrefix: "/auth" });

app.use(authApp);
app.listen(3000, () => console.log("Server running on port 3000"));

Frontend (React)

import AuthApp from "uli-auth-frontend";

function App() {
  return <AuthApp apiUrl="https://your-backend.com/api" />;
}

export default App;

📜 API Endpoints

Method Endpoint Description
POST /auth/register Register new user
POST /auth/login User login
POST /auth/verify-otp OTP verification
GET /users/profile Fetch user profile
DELETE /users/account Delete user account

Top categories

Loading Svelte Themes