@tech_cidroy/create-adonis6-postgres
v1.1.0
Published
A powerful CLI wrapper developed by CIDROY-Tech for internal use within our organization. This tool quickly scaffolds a new AdonisJS 6 project with PostgreSQL, JWT authentication, and logging service pre-configured out of the box.
Readme
🚀 Create AdonisJS 6 PostgreSQL
A powerful CLI wrapper developed by CIDROY-Tech for internal use within our organization. This tool quickly scaffolds a new AdonisJS 6 project with PostgreSQL, JWT authentication, and logging service pre-configured out of the box.
✨ Features Out of the Box
- 🎯 AdonisJS 6 - Latest version with modern architecture
- 🐘 PostgreSQL - Pre-configured database setup and connection
- 🔐 JWT Token Authentication - Complete auth system ready to use
- 📝 Logger Service - Professional logging capabilities built-in
- 🔑 Auto Configuration - Generates APP_KEY automatically
- 🗄️ Database Setup - Creates
.envwith project-specific database name - 📦 Package Configuration - Updates package.json with your project name
- 🎨 Beautiful CLI - Interactive prompts with ASCII art
- 🏢 Enterprise Ready - Built for production use in tech organizations
🚀 Quick Start
Recommended Usage with npx:
npx @tech_cidroy/create-adonis6-postgresThis is the preferred method as it ensures you always use the latest version without global installation.
📋 What it does
- Prompts for project name - Interactive CLI to get your project details
- Clones starter template - Downloads the AdonisJS PostgreSQL starter from GitHub
- Configures environment - Creates
.envfile with database name based on your project - Updates package.json - Sets the correct package name for your project
- Installs dependencies - Runs npm install automatically
- Generates app key - Creates a secure APP_KEY for your application
- Ready to go! - Your project is ready for development
📁 Project Structure
After running the command, you'll get a project structure like:
my-adonis-app/
├── app/
│ ├── controllers/
│ ├── models/
│ ├── middleware/
│ └── services/
├── config/
├── database/
│ ├── migrations/
│ └── seeders/
├── start/
├── .env
├── package.json
└── ace🔧 Development
After project creation, navigate to your project and start development:
cd your-project-name
npm run dev🗃️ Database Setup
The tool automatically:
- Creates a
.envfile with database configuration - Generates a database name based on your project name (sanitized)
- Sets up PostgreSQL connection strings
Make sure to:
- Have PostgreSQL installed and running
- Create the database mentioned in your
.envfile - Run migrations:
node ace migration:run - Run seeders:
node ace db:seed( optional )
📝 Environment Variables
The generated .env file includes:
NODE_ENV=development
PORT=3333
APP_KEY=<auto-generated>
DB_CONNECTION=pg
DB_HOST=127.0.0.1
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=
DB_DATABASE=your_project_name🤝 Contributing
We welcome contributions! Please see our contributing guidelines.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License.
🆘 Support
If you encounter any issues:
- Check the starter template repository
- Open an issue on GitHub
- Contact us at [email protected]
🙏 Acknowledgments
- AdonisJS - The amazing Node.js framework
- PostgreSQL - The world's most advanced open source database
