FlexApp - Dynamic Content Management System
A comprehensive, AI-powered content management system that allows users to dynamically create, manage, and organize content types with flexible schema definitions. Built with modern web technologies and designed for scalability and ease of use.
š Features
Core Functionality
- Dynamic Schema Creation - Create custom content types with flexible field definitions
- AI-Powered Schema Generation - Use AI to automatically generate schemas from natural language descriptions
- Content Management - Full CRUD operations for managing content entries
- User Authentication - Secure JWT-based authentication system
- Role-Based Access Control - Granular permissions for different user roles
- Real-time Form Validation - Client-side validation with comprehensive error handling
- Responsive Design - Mobile-first approach with modern UI components
Advanced Features
- Dynamic API Endpoints - RESTful APIs that adapt to your custom schemas
- Data Export/Import - Support for JSON data operations
- Audit Trail - Track changes and user activities
- Performance Optimized - Efficient database queries and caching strategies
- Extensible Architecture - Plugin-ready system for future enhancements
š ļø Technology Stack
Frontend
- Framework - Next.js 15.3.3 with React 19
- Language - TypeScript
- Styling - Tailwind CSS with Radix UI components
- State Management - React hooks and context
- Build Tool - Next.js built-in bundler
- Package Manager - npm/bun
Backend
- Framework - Spring Boot 3.5.0
- Language - Java 17
- Database - PostgreSQL with JPA/Hibernate
- Security - Spring Security with JWT
- Build Tool - Maven
- API Documentation - OpenAPI/Swagger
External Services
- AI Integration - GitHub Models API for schema generation
- Database - PostgreSQL for data persistence
š Project Structure
FlexApp/
āāā flexapi/ # Frontend Application (Next.js)
ā āāā src/
ā ā āāā app/ # Next.js App Router
ā ā āāā components/ # Reusable UI Components
ā ā āāā lib/ # Utility Functions
ā āāā public/ # Static Assets
ā āāā package.json
āāā flexApi-backend/ # Backend Application (Spring Boot)
ā āāā src/main/java/flexAPI/flexApi/
ā ā āāā Controller/ # REST Controllers
ā ā āāā Service/ # Business Logic
ā ā āāā Entity/ # JPA Entities
ā ā āāā DTO/ # Data Transfer Objects
ā ā āāā Security/ # Security Configuration
ā ā āāā Exceptions/ # Custom Exceptions
ā āāā src/main/resources/
ā ā āāā application.properties
ā āāā pom.xml
āāā FRONTEND_DOCUMENTATION.md # Detailed Frontend Docs
āāā BACKEND_DOCUMENTATION.md # Detailed Backend Docs
āāā README.md # This file
š Prerequisites
Before running this application, make sure you have the following installed:
System Requirements
- Node.js - v18.0.0 or higher
- Java - JDK 17 or higher
- PostgreSQL - v12 or higher
- Maven - v3.6.0 or higher
- Git - Latest version
Environment Setup
- PostgreSQL database server running
- GitHub Models API access (for AI features)
- Modern web browser with JavaScript enabled
š Installation & Setup
1. Clone the Repository
git clone https://github.com/Rahul-Sahani04
cd FlexApp2. Backend Setup
Database Configuration
-- Create PostgreSQL database
CREATE DATABASE flexapp_db;
-- Create user (optional)
CREATE USER flexapp_user WITH PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE flexapp_db TO flexapp_user;Environment Variables
Create flexApi-backend/src/main/resources/application.properties:
# Database Configuration
spring.datasource.url=jdbc:postgresql://localhost:5432/flexapp_db
spring.datasource.username=your_username
spring.datasource.password=your_password
# JWT Configuration
jwt.secret=your_jwt_secret_key_here
jwt.expiration=86400000
# AI Service Configuration
ai.api.key=your_github_models_api_key
ai.api.url=https://api.github.com/models
# Server Configuration
server.port=8080Install Dependencies & Run
cd flexApi-backend
mvn clean install
mvn spring-boot:run3. Frontend Setup
Environment Variables
Create flexapi/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:8080/api
NEXT_PUBLIC_APP_NAME=FlexAppInstall Dependencies & Run
cd flexapi
npm install
npm run devš Usage
Accessing the Application
- Frontend: Open http://localhost:3000 in your browser
- Backend API: Available at http://localhost:8080/api
Getting Started
- Sign Up: Create a new account or login with existing credentials
- Dashboard: Access your personalized dashboard
- Content Types: Create custom content types using the schema builder
- AI Schema Generator: Use AI to generate schemas from descriptions
- Content Management: Add, edit, and manage your content entries
API Usage Examples
Authentication
# Login
POST /api/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "password"
}Schema Management
# Create Schema
POST /api/schemas
Authorization: Bearer <jwt-token>
Content-Type: application/json
{
"name": "Article",
"fields": [
{
"name": "title",
"type": "string",
"required": true
}
]
}š Documentation
For detailed documentation, please refer to:
- Frontend Documentation: Comprehensive guide for the Next.js frontend
- Backend Documentation: Detailed backend API and architecture documentation
š§ Development
Available Scripts
Frontend
cd flexapi
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLintBackend
cd flexApi-backend
mvn clean install # Clean and install dependencies
mvn spring-boot:run # Start Spring Boot application
mvn test # Run testsCode Quality
- Frontend - ESLint for code linting, TypeScript for type checking
- Backend - Spring Boot best practices, JPA/Hibernate standards
- Testing - Unit tests with JUnit, integration tests with Spring Test
š¤ Contributing
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a 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
Development Guidelines
- Follow existing code style and conventions
- Write comprehensive tests for new features
- Update documentation for any API changes
- Ensure all tests pass before submitting PR
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Support
If you encounter any issues or have questions:
- Check the Frontend Documentation and Backend Documentation
- Search existing GitHub issues
- Create a new issue with detailed information
š Acknowledgments
- Next.js - for the excellent React framework
- Spring Boot - for the robust backend framework
- Radix UI - for accessible UI components
- Tailwind CSS - for utility-first styling
- PostgreSQL - for reliable data persistence
Built with ā¤ļø using modern web technologies