Skip to content

onosejoor/auth-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔑 SecureFlow: Modern Authentication Template

Unlock secure and seamless authentication for your projects with SecureFlow! This template provides a robust foundation for user authentication, combining cutting-edge technologies and best practices.

✨ Description

SecureFlow is designed to streamline the implementation of authentication in your applications. It includes both Go (Fiber) and Node.js (Express) servers, along with a Next.js client, offering a comprehensive solution for modern web development.

🚀 Installation

Get started with SecureFlow in just a few steps:

  • Clone the Repository:

    git clone https://github.com/onosejoor/auth-template.git
    cd auth-template
  • Install Dependencies:

    For the client:

    cd client
    npm install
    cd ..

    For the Node.js server (if applicable):

    cd node_server
    npm install
    cd ..

    For the Go server (if applicable):

    cd go_server
    go mod tidy
    cd ..
  • Configure Environment Variables:

    • Copy .env.example to .env in both go_server and client directories.
    • Fill in the required variables:
      • MONGODB_URL: Your MongoDB connection string.
      • JWT_SECRET: Secret key for JWT.
      • ACCESS_SECRET: Secret key for access tokens.
      • SERVER_URL: The URL of your backend server.
      • ENVIRONMENT: Set to production for production environments.

💻 Usage

Running the Application

  • Client:

    cd client
    npm run dev
  • Node.js Server:

    cd node_server
    npm run dev
  • Go Server:

    cd go_server
    go run main.go

Access the Application

  1. Open your web browser.
  2. Navigate to http://localhost:3000 (or the port specified by your client configuration).
  3. You can now sign up, sign in, and access the profile page

🌟 Features

  • 🛡️ Secure Authentication: Robust sign-up, sign-in, and OAuth flows.
  • 🔑 JWT Handling: Secure handling of JSON Web Tokens for session management.
  • 🌐 Cross-Origin Support: CORS configured for seamless communication between client and server.
  • 🚦 Middleware: Authentication middleware to protect routes.
  • ⚙️ Validation: Data validation to ensure clean and secure data handling.
  • Dual Server Options: Choose between Go (Fiber) and Node.js (Express) for your backend.
  • 🎨 Modern UI: Uses Radix UI and Tailwind CSS for a sleek, modern user interface.

🛠️ Technologies Used

Technology Description Link
TypeScript Primary language for client and Node.js server TypeScript
Next.js React framework for the client Next.js
Go Backend server language option Go
Fiber Go web framework (if Go server chosen) Fiber
Node.js Backend server language option Node.js
Express Node.js web framework (if Node.js server chosen) Express
MongoDB Database for user data MongoDB
Radix UI Set of accessible UI primitives Radix UI
Tailwind CSS Utility-first CSS framework Tailwind CSS
Zod Schema validation Zod
JSON Web Token Industry standard for secure authentication JWT

🎉 Contributing

We welcome contributions to SecureFlow! Here's how you can help:

  • 🐛 Report Bugs: Submit detailed bug reports to help us improve.
  • 💡 Suggest Features: Share your ideas for new features and enhancements.
  • 🛠️ Submit Pull Requests: Contribute code by submitting pull requests.

Please follow these guidelines:

  • Ensure your code adheres to the project's coding standards.
  • Provide clear and concise commit messages.
  • Test your changes thoroughly.

CHANGELOG

Refer to the CHANGELOG for the changelogs

👨‍💻 Author Info

🛡️ Badges

Go NodeJS TypeScript NextJS Tailwind CSS

Readme was generated by Dokugen

About

this is an Auth template using Go or express as the Backend, then Next.js as the frontend

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors