3.6 KiB
3.6 KiB
corradAF Setup Guide
This guide will help you set up the corradAF framework template for your new project.
🚀 Quick Setup
1. Environment Configuration
Create a .env
file in your project root with the following variables:
# Database Configuration
DATABASE_URL="postgresql://username:password@localhost:5432/database_name"
# Authentication
JWT_SECRET="your-super-secret-jwt-key-change-this-in-production"
AUTH_ORIGIN="http://localhost:3000"
# Application
NUXT_SECRET_KEY="your-nuxt-secret-key-for-session-encryption"
APP_NAME="Your Application Name"
APP_URL="http://localhost:3000"
# Email Configuration (Optional)
MAIL_HOST="smtp.example.com"
MAIL_PORT="587"
MAIL_USERNAME="your-email@example.com"
MAIL_PASSWORD="your-email-password"
MAIL_FROM_ADDRESS="noreply@yourapp.com"
MAIL_FROM_NAME="Your App Name"
# Development
NODE_ENV="development"
NUXT_HOST="localhost"
NUXT_PORT="3000"
2. Database Setup
corradAF uses Prisma as the ORM. Follow these steps:
- Configure your database URL in the
.env
file - Run database setup:
yarn prisma # This runs: npx prisma db pull && npx prisma generate && nuxt dev
3. First Run
# Install dependencies
yarn install
# Start development server
yarn dev
🔧 Development Tools Access
After setup, you can access these development tools:
- User Management:
/devtool/user-management/user
- Menu Editor:
/devtool/menu-editor
- API Editor:
/devtool/api-editor
- Content Editor:
/devtool/content-editor
- Code Playground:
/devtool/code-playground
- ORM Tools:
/devtool/orm
- Configuration:
/devtool/config
🎨 Customization
Update Branding
- App Name: Update in
.env
file (APP_NAME
) - Colors: Modify
tailwind.config.js
- Logo: Replace files in
public/
directory - Favicon: Replace
public/favicon.ico
Navigation Structure
Edit the navigation configuration in navigation/
directory to customize menus.
Authentication
The authentication system is ready to use with:
- User registration at
/register
- Login at
/login
- Password recovery at
/forgot-password
📦 Production Deployment
Environment Variables
Ensure these production environment variables are set:
NODE_ENV="production"
DATABASE_URL="your-production-database-url"
JWT_SECRET="your-production-jwt-secret"
AUTH_ORIGIN="https://yourdomain.com"
NUXT_SECRET_KEY="your-production-secret-key"
Build Commands
# Build for production
yarn build
# Preview production build locally
yarn preview
🛠️ Extending the Framework
Adding New Development Tools
- Create new page in
pages/devtool/your-tool/
- Add navigation entry
- Implement functionality
Custom Components
Add your custom components in components/
directory following the existing structure.
API Endpoints
Create server routes in server/api/
directory.
🐛 Troubleshooting
Common Issues
- Database Connection Issues: Verify DATABASE_URL in
.env
- Authentication Problems: Check JWT_SECRET configuration
- Build Errors: Ensure all dependencies are installed with
yarn install
- Port Conflicts: Change NUXT_PORT in
.env
file
Getting Help
- Check the main README.md for detailed documentation
- Review existing development tools for implementation examples
- Create issues in the repository for bugs or feature requests
📝 Next Steps
After setup:
- Customize the dashboard welcome page with your project branding
- Set up your project-specific features
- Configure authentication and user roles
- Start building your application features
Happy coding with corradAF! 🚀