A modern, full-stack content management system built with Angular (Frontend) and Node.js/Express (Backend), featuring AI-powered content generation and analytics.
ai-cms/
├── backend/ # Node.js/Express backend
│ ├── routes/ # API routes
│ ├── models/ # MongoDB models
│ ├── middleware/ # Custom middleware
│ ├── config/ # Configuration files
│ └── server.js # Main server file
├── frontend/ # Angular frontend
│ ├── src/
│ │ ├── app/
│ │ │ ├── features/ # Feature modules
│ │ │ ├── core/ # Core services
│ │ │ └── shared/ # Shared components
│ │ └── styles.css # Global styles
│ └── angular.json # Angular configuration
└── README.md # This file
- User registration and login
- JWT-based authentication
- Role-based access control
- Password validation and security
- Create, edit, and manage content
- Rich text editor
- Content categorization and tagging
- Draft and publish workflow
- AI content generation
- SEO optimization suggestions
- Content analysis and insights
- Smart tag recommendations
- Content performance metrics
- User engagement analytics
- SEO performance tracking
- Real-time insights
- Responsive design
- Dark/Light theme support
- Modern component library
- Smooth animations
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose
- Authentication: JWT
- Validation: Joi
- Security: bcryptjs, helmet, cors
- Framework: Angular 17+
- Styling: Tailwind CSS
- State Management: Angular Signals
- Routing: Angular Router
- HTTP Client: Angular HttpClient
- Node.js 18+
- MongoDB 6+
- Angular CLI 17+
-
Clone the repository
git clone <your-repo-url> cd ai-cms
-
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd ../frontend npm install -
Environment Setup
cd ../backend cp env.example .env # Edit .env with your configuration
-
Start the backend
cd backend npm start -
Start the frontend
cd frontend npm start
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/refresh- Refresh tokenGET /api/auth/profile- Get user profile
GET /api/content- List contentPOST /api/content- Create contentPUT /api/content/:id- Update contentDELETE /api/content/:id- Delete content
GET /api/profile/me- Get current user profilePUT /api/profile/me- Update profilePOST /api/profile/avatar- Upload avatarDELETE /api/profile/avatar- Remove avatar
GET /api/analytics/dashboard- Dashboard analyticsGET /api/analytics/content/:id- Content analytics
cd backend
npm run dev # Development mode with nodemon
npm start # Production mode
npm test # Run testscd frontend
ng serve # Development server
ng build # Production build
ng test # Run tests
ng lint # Lint code# MongoDB connection string in .env
MONGODB_URI=mongodb://localhost:27017/ai-cms- Routes: API endpoint definitions
- Models: MongoDB schema definitions
- Middleware: Custom Express middleware
- Config: Database and environment configuration
- Features: Feature-based modules (auth, content, analytics)
- Core: Essential services and guards
- Shared: Reusable components and utilities
- Set production environment variables
- Build and start the server
- Use PM2 or similar for process management
- Build the production bundle:
ng build --prod - Deploy the
dist/folder to your hosting service - Configure routing for SPA
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
Built with ❤️ using modern web technologies