Skip to content

2yt-code/OrainAuth

Repository files navigation

OrainAuth - Django

Python Version Django Version

Table of Contents

Features

  • Custom User Model: Fully customizable user profiles using Django's AbstractUser
  • Secure Authentication: Password hashing, CSRF protection, and session-based security

Tech Stack

  • Backend: Python & Django
  • Frontend: HTML5, CSS3, Bootstrap 4/5
  • Database: MySQL
  • Security: Django Middleware, CSRF Tokens, Password Hashing

Prerequisites

  • Python 3.9+
  • MySQL Server
  • Git

Installation

Follow these steps to get a local copy up and running:

  1. Clone the repository:
   git clone https://github.com/2yt-code/OrainAuth.git
   cd OrainAuth
  1. Create a Virtual Environment:
   python -m venv venv
   # On Windows:
   venv\Scripts\activate
   # On Linux:
   source venv/bin/activate
  1. Install dependencies:
   pip install -r requirements.txt
  1. Creating the .env file:

The project uses environment variables for sensitive information Copy the example environment file:

   # For Windows
   copy .env.example .env
   # For linux
   cp .env.example .env

Open the .env file and update SECRET_KEY. By default the project uses SQLite (DB_ENGINE=sqlite). To use MySQL instead, set DB_ENGINE=mysql and fill in the database credentials.

  1. Database Setup:

SQLite (default): no extra setup needed.

MySQL: create a database first:

   CREATE DATABASE orainauth;

Ensure your MySQL user has permissions to access this database

  1. Run Migrations:
   python manage.py makemigrations
   python manage.py migrate
  1. Start the Server:
   python manage.py runserver

Now open http://127.0.0.1:8000/ in your browser

Usage

To access the authentication flow:

- Login: accounts/login
- Register:  accounts/register
- Dashboard: dashboard/
- Home : /

Screenshots

Login Page Dashboard Page Home Page

I would appreciate it if you could add a star to support my project 🙏

About

A professional and secure Django authentication model

Topics

Resources

License

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors