Skip to content

About

Login-System is a modern, robust authentication system built with Next.js 15 (App Router) and Oracle Database. This project features a stunning, high-performance UI with secure server-side session management.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Premium Auth System (Next.js + Oracle DB)

A modern, robust authentication system built with Next.js 15 (App Router) and Oracle Database. This project features a stunning, high-performance UI with secure server-side session management.


🚀 Features

  • Secure Authentication: Password hashing using bcrypt.
  • Persistent Sessions: HTTP-only cookie-based session management.
  • Oracle DB Integration: Direct connection using the oracledb driver.
  • PL/SQL Stored Procedures: Optimized user creation using database-side logic.
  • Premium UI/UX:
    • Glassmorphism design system.
    • Smooth transitions with framer-motion.
    • Dynamic tab switching between Login and Registration.
    • Real-time form validation with react-hook-form and zod.
  • Smart Logic:
    • Automatically detects existing users during signup and switches to login without losing data.
    • Server-side redirects for protected routes.
  • Comprehensive SEO: Custom SEO component with JSON-LD structured data and OpenGraph support.

🛠️ Technology Stack

  • Framework: Next.js 15
  • Language: TypeScript
  • Database: Oracle Database (XE/Enterprise)
  • Styling: Tailwind CSS
  • Animations: Framer Motion
  • Form Handling: React Hook Form + Zod
  • Security: Bcrypt + HTTP-only Cookies

📁 Project Structure

├── app/
│   ├── api/
│   │   ├── signin/route.ts    # Login logic & cookie creation
│   │   └── signup/route.ts    # Registration & duplicate checks
│   ├── welcome/               # Protected welcome page
│   ├── layout.tsx             # Root layout with SEO
│   └── page.tsx               # Home page with Login/Register form
├── components/
│   ├── LoginForm.tsx          # Main interactive auth component
│   └── SEO.tsx                # Advanced metadata manager
├── libs/
│   └── db.ts                  # Oracle DB connection config
├── sql/                       # Database scripts
│   ├── tables.sql             # User table definition
│   └── procedures.sql         # Stored procedures for user management
└── public/                    # Static assets

⚙️ Setup Instructions

1. Database Setup

Ensure you have an Oracle Database instance running. Run the scripts in the sql/ folder in the following order:

  1. tables.sql (Creates the users table)
  2. procedures.sql (Creates the insert_user procedure)

2. Environment Configuration

Update the libs/db.ts file with your Oracle DB credentials:

export const dbConfig = {
  user: "YOUR_USERNAME",
  password: "YOUR_PASSWORD",
  connectString: "localhost:1521/XE", // Or your TNS connection string
}

3. Installation

Install the dependencies using pnpm (recommended) or npm:

pnpm install

4. Running the Project

Start the development server:

pnpm dev

🔒 Security Features

  • HTTP-Only Cookies: Prevents XSS attacks from stole session tokens.
  • Password Salting: Uses 10 rounds of salt with Bcrypt.
  • Input Validation: Strict Zod schemas for both client and server-side validation.
  • Server-Side Protection: Route guarding using Next.js Middleware/Server Components.

Built with ❤️ by RixelDev.

About

Login-System is a modern, robust authentication system built with Next.js 15 (App Router) and Oracle Database. This project features a stunning, high-performance UI with secure server-side session management.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages