fauth-template
v1.1.6
Published
Generate auth templates for your projects
Maintainers
Readme
🔑 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-templateInstall 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.exampleto.envin bothgo_serverandclientdirectories. - 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 toproductionfor production environments.
- Copy
💻 Usage
Running the Application
Client:
cd client npm run devNode.js Server:
cd node_server npm run devGo Server:
cd go_server go run main.go
Access the Application
- Open your web browser.
- Navigate to
http://localhost:3000(or the port specified by your client configuration). - 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
Onos Ejoor
- Website: https://onos-ejoor.vercel.app
- Twitter: @DevText16
- GitHub: onosejoor
