UNPKG

nbd-app

Version:

šŸš€ CLI tool to scaffold full-stack authentication starter projects with React, Node.js, and multiple auth providers (Email, Google, and more)

195 lines (145 loc) • 5.22 kB
# nbd-app šŸš€ **nbd-app** is a powerful CLI tool that scaffolds production-ready, full-stack authentication starter projects. Get up and running in seconds with React, Node.js, Express, Tailwind CSS, and multiple authentication providers. [![npm version](https://badge.fury.io/js/nbd-app.svg)](https://badge.fury.io/js/nbd-app) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) --- ## ✨ Features - šŸŽÆ **Multiple Auth Options**: Email verification, Google OAuth, and more - ⚔ **Lightning Fast**: Vite + React for blazing fast development - šŸŽØ **Beautiful UI**: Pre-configured Tailwind CSS styling - šŸ”’ **Production Ready**: Security best practices built-in - šŸ› ļø **Full Stack**: Complete frontend + backend setup - šŸ“± **Responsive**: Mobile-first design approach - šŸš€ **Zero Config**: Works out of the box ## šŸš€ Quick Start **Run directly (recommended):** ```bash npx nbd-app@latest ``` **āŒ Don't install globally** _(to always get the latest version)_ ## šŸŽÆ Interactive Setup The CLI will guide you through: 1. **Project Name** - Your project folder name 2. **Package Name** - NPM package name 3. **Language** - JavaScript (TypeScript coming soon) 4. **Framework** - React JS (Next.js coming soon) 5. **Auth Template** - Choose your authentication setup ## šŸ“‹ Available Templates ### šŸ” Authentication Options - **Email + Google** - Complete auth with email verification and Google OAuth - **Email Only** - Traditional email/password with verification - **Google Only** - Simple Google OAuth login ### šŸ”® Coming Soon - Facebook, GitHub, Twitter OAuth - TypeScript support - Next.js templates - Database integrations (MongoDB, PostgreSQL) ## šŸ› ļø Tech Stack ### Frontend - **React 18** - Modern React with hooks - **Vite** - Super fast build tool - **Tailwind CSS** - Utility-first CSS framework - **React Router** - Client-side routing ### Backend - **Node.js** - JavaScript runtime - **Express.js** - Web framework - **JWT** - JSON Web Tokens for auth - **Bcrypt** - Password hashing - **Nodemailer** - Email service ## šŸ“ Project Structure ``` your-project/ ā”œā”€ā”€ frontend/ │ ā”œā”€ā”€ src/ │ │ ā”œā”€ā”€ components/ │ │ ā”œā”€ā”€ pages/ │ │ ā”œā”€ā”€ utils/ │ │ └── App.jsx │ ā”œā”€ā”€ public/ │ └── package.json ā”œā”€ā”€ backend/ │ ā”œā”€ā”€ routes/ │ ā”œā”€ā”€ middleware/ │ ā”œā”€ā”€ models/ │ ā”œā”€ā”€ controllers/ │ └── server.js ā”œā”€ā”€ .env.example └── README.md ``` ## šŸš€ Getting Started After creating your project: ```bash # Navigate to your project cd your-project-name # Install dependencies npm install # Configure environment variables cp .env.example .env # Edit .env with your credentials # Start development servers npm run dev ``` ## šŸ”§ Configuration ### Environment Variables ```env # Database DATABASE_URL=your_database_url # JWT JWT_SECRET=your_jwt_secret # Email Service EMAIL_USER=your_email@gmail.com EMAIL_PASS=your_email_password # Google OAuth (if using Google auth) GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret ``` ## šŸ“š Documentation ### Authentication Flow 1. **Email Verification** - Users receive verification emails 2. **Secure Login** - JWT tokens with refresh mechanism 3. **Protected Routes** - Frontend and backend route protection 4. **Password Reset** - Secure password reset flow ### API Endpoints - `POST /api/auth/register` - User registration - `POST /api/auth/login` - User login - `GET /api/auth/verify/:token` - Email verification - `POST /api/auth/forgot-password` - Password reset - `GET /api/auth/google` - Google OAuth ## šŸ¤ Contributing We welcome contributions! Here's how you can help: 1. **Add Templates** - Create new authentication templates 2. **Report Bugs** - Open issues for any problems 3. **Feature Requests** - Suggest new features 4. **Documentation** - Improve our docs ### Adding New Templates ```bash # Create a new template folder templates/ ā”œā”€ā”€ react_facebook_auth/ │ ā”œā”€ā”€ frontend/ │ ā”œā”€ā”€ backend/ │ └── README.md ``` ## šŸ“Š Roadmap - [ ] TypeScript support - [ ] Next.js templates - [ ] Vue.js support - [ ] Database integrations - [ ] Docker support - [ ] Testing setup - [ ] CI/CD templates ## šŸ› Issues & Support - šŸ› **Bug Reports**: [GitHub Issues](https://github.com/Nischayb99/nbd-app/issues) - šŸ’” **Feature Requests**: [GitHub Discussions](https://github.com/Nischayb99/nbd-app/discussions) - šŸ“§ **Email**: nischayb99@gmail.com ## šŸ“œ License [MIT](./LICENSE) Ā© [Nischay Bandodiya](https://github.com/Nischayb99) ## šŸ™ Acknowledgments - Thanks to all contributors - Inspired by create-react-app and similar tools - Built with ā¤ļø for the developer community --- <div align="center"> **⭐ Star this repo if it helped you!** Made with ā¤ļø by [Nischay Bandodiya](https://github.com/Nischayb99) </div>