A modern full-stack application for intelligent content management with AI-powered features.
Full-stack content management system with Spring Boot backend and React frontend, featuring AI-powered summarization, SEO optimization, and intelligent tagging.
- Features
- Screenshots
- Tech Stack
- Quick Start
- Installation
- Configuration
- Running the App
- API Endpoints
- Project Structure
- Deployment
- Troubleshooting
- Contributing
- License
- User Authentication - JWT-based login/register with role-based access (USER, AUTHOR, ADMIN)
- Article Management - Create, edit, delete articles with rich text editor
- AI-Powered Tools - Auto-summarization, tag generation, and SEO scoring
- Dashboard Analytics - Track content performance with stats and metrics
- Search & Filter - Search by title, filter by tags and status
- Dark/Light Mode - Beautiful Google-inspired UI with theme switching
- Responsive Design - Works perfectly on desktop, tablet, and mobile
- β Automatic content summarization
- β Intelligent tag generation
- β SEO score calculator with actionable suggestions
- β Readability analysis
- β Keyword density optimization
- β JWT token authentication
- β BCrypt password encryption
- β Role-based authorization
- β Secure API endpoints
- β CORS configuration
Note: Add your screenshots to
docs/screenshots/folder
| Landing Page | Dashboard |
|---|---|
![]() |
![]() |
| Article Editor | Dark Mode |
|---|---|
![]() |
![]() |
- Java 17 - Programming language
- Spring Boot 3.2.2 - Application framework
- Spring Security - Authentication & authorization
- Spring Data JPA - Database operations
- MySQL 8.0 - Database
- JWT - Token-based authentication
- Lombok - Reduce boilerplate code
- MapStruct - Object mapping
- Swagger/OpenAPI - API documentation
- Maven - Build tool
- React 18.2 - UI library
- Vite 5.0 - Build tool & dev server
- TailwindCSS 3.4 - Styling framework
- Framer Motion - Animations
- React Router 6 - Navigation
- Zustand - State management
- Axios - HTTP client
- Lucide React - Icons
Make sure you have these installed:
Java 17+ # java -version
Maven 3.6+ # mvn -version
MySQL 8.0+ # mysql --version
Node.js 18+ # node -v
npm 9+ # npm -v# 1. Clone the repository
git clone https://github.com/YOUR_USERNAME/smartcontent.git
cd smartcontent
# 2. Setup Backend
cd smartcontent-backend
mysql -u root -p -e "CREATE DATABASE smart_content_db;"
mysql -u root -p smart_content_db < schema.sql
mvn clean install
mvn spring-boot:run
# 3. Setup Frontend (in new terminal)
cd ../smartcontent-frontend
npm install
cp .env.example .env
npm run dev
# 4. Open browser
http://localhost:3000That's it! π
git clone https://github.com/YOUR_USERNAME/smartcontent.git
cd smartcontent# Login to MySQL
mysql -u root -p
# Create database
CREATE DATABASE smart_content_db;
exit;cd smartcontent-backend
mysql -u root -p smart_content_db < schema.sqlEdit src/main/resources/application.yml:
spring:
datasource:
url: jdbc:mysql://localhost:3306/smart_content_db
username: root
password: YOUR_MYSQL_PASSWORD # β Change this!Create file: src/main/java/com/smartcontent/config/CorsConfig.java
package com.smartcontent.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import java.util.Arrays;
@Configuration
public class CorsConfig {
@Bean
public CorsFilter corsFilter() {
CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.setAllowedOrigins(Arrays.asList("http://localhost:3000"));
config.setAllowedHeaders(Arrays.asList("*"));
config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS"));
config.setExposedHeaders(Arrays.asList("Authorization"));
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", config);
return new CorsFilter(source);
}
}mvn clean installcd smartcontent-frontend
npm install# Create .env file
cp .env.example .envEdit .env:
VITE_API_BASE_URL=http://localhost:8080/apiserver:
port: 8080
spring:
datasource:
url: jdbc:mysql://localhost:3306/smart_content_db
username: root
password: your_password
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
hibernate:
ddl-auto: update
show-sql: true
app:
security:
jwt:
secret-key: YOUR_SECRET_KEY_HERE # Change this!
expiration-ms: 86400000 # 24 hoursVITE_API_BASE_URL=http://localhost:8080/apicd smartcontent-backend
mvn spring-boot:runβ
Backend running at: http://localhost:8080
π API Docs at: http://localhost:8080/swagger-ui.html
cd smartcontent-frontend
npm run devβ Frontend running at: http://localhost:3000
cd smartcontent-backend
mvn clean package
java -jar target/ai-content-manager-1.0.0.jarcd smartcontent-frontend
npm run build
npm run preview| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /api/auth/register |
Register new user | No |
| POST | /api/auth/login |
Login user | No |
Register Example:
curl -X POST http://localhost:8080/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"username": "johndoe",
"email": "john@example.com",
"password": "password123",
"fullName": "John Doe",
"roles": ["AUTHOR"]
}'| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/articles |
Get all articles (paginated) | No |
| GET | /api/articles/{id} |
Get article by ID | No |
| POST | /api/articles |
Create new article | Required |
| PUT | /api/articles/{id} |
Update article | Required |
| DELETE | /api/articles/{id} |
Delete article | Required |
| GET | /api/articles/search?title={title} |
Search articles | No |
| GET | /api/articles/filter/tags?tags={tags} |
Filter by tags | No |
| GET | /api/articles/my-articles |
Get user's articles | Required |
Create Article Example:
curl -X POST http://localhost:8080/api/articles \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "My First Article",
"content": "Article content here...",
"status": "PUBLISHED",
"tags": ["Technology", "AI"]
}'| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /api/ai/summarize |
Generate summary | Required |
| POST | /api/ai/generate-tags |
Generate tags | Required |
| POST | /api/ai/seo-score |
Calculate SEO score | Required |
Generate Summary Example:
curl -X POST http://localhost:8080/api/ai/summarize \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": "Your article content..."}'Full API documentation available at: http://localhost:8080/swagger-ui.html
smartcontent/
β
βββ smartcontent-backend/ # Spring Boot Backend
β βββ src/main/java/com/smartcontent/
β β βββ config/ # Configuration (Security, CORS, Swagger)
β β βββ controller/ # REST Controllers
β β βββ service/ # Business Logic
β β βββ repository/ # Database Repositories
β β βββ entity/ # JPA Entities
β β βββ dto/ # Data Transfer Objects
β β βββ security/ # JWT & Security
β β βββ exception/ # Exception Handling
β β βββ util/ # Utilities
β βββ src/main/resources/
β β βββ application.yml # Configuration
β βββ pom.xml # Maven Dependencies
β βββ schema.sql # Database Schema
β
βββ smartcontent-frontend/ # React Frontend
βββ src/
β βββ components/
β β βββ common/ # Reusable Components
β β βββ landing/ # Landing Page
β β βββ dashboard/ # Dashboard Components
β βββ pages/ # Page Components
β βββ layouts/ # Layout Wrappers
β βββ store/ # State Management
β βββ services/ # API Services
β βββ hooks/ # Custom Hooks
β βββ utils/ # Utilities
βββ package.json # Dependencies
βββ tailwind.config.js # Tailwind Config
βββ vite.config.js # Vite Config
βββ .env # Environment Variables
# Build Docker image
cd smartcontent-backend
docker build -t smartcontent-backend .
docker run -p 8080:8080 smartcontent-backendDockerfile:
FROM openjdk:17-jdk-slim
WORKDIR /app
COPY target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]cd smartcontent-backend
heroku create smartcontent-api
git push heroku maincd smartcontent-frontend
npm i -g vercel
vercelnpm run build
# Upload dist/ folder to NetlifyFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "preview"]Problem: Access to fetch... has been blocked by CORS policy
Solution: Make sure you added CorsConfig.java to backend and restarted the server.
Problem: Connection refused or Unknown database
Solution:
# Check MySQL is running
sudo systemctl status mysql # Linux
net start MySQL80 # Windows
# Create database if missing
mysql -u root -p -e "CREATE DATABASE smart_content_db;"Problem: Port 8080 is already in use
Solution:
# Windows
netstat -ano | findstr :8080
taskkill /PID <PID> /F
# Linux/Mac
lsof -ti:8080 | xargs kill -9Problem: Network errors in browser console
Solution:
# Check .env file exists and is correct
cat smartcontent-frontend/.env
# Should show:
VITE_API_BASE_URL=http://localhost:8080/api
# Restart frontend
npm run devProblem: 401 Unauthorized errors
Solution:
- Token expires after 24 hours - login again
- Check token is being sent in Authorization header
- Make sure you're logged in
# Test backend is running
curl http://localhost:8080/api/auth/login
# Expected: 400 or 401 (NOT 404)# Test frontend is running
curl http://localhost:3000
# Should return HTMLcd smartcontent-backend
mvn testcd smartcontent-frontend
npm testEdit smartcontent-frontend/tailwind.config.js:
colors: {
google: {
blue: '#4285F4', // Change to your color
red: '#EA4335',
yellow: '#FBBC05',
green: '#34A853',
}
}Edit smartcontent-frontend/index.html:
<!-- Change from: -->
<html lang="en" class="dark">
<!-- To: -->
<html lang="en">Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Backend: Follow Java conventions
- Frontend: Use ESLint
- Write meaningful commit messages
- Add tests for new features
This project is licensed under the MIT License.
MIT License
Copyright (c) 2024 Your Name
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
Your Name
- GitHub: @yourusername
- Email: your.email@example.com
- LinkedIn: Your Name
- Spring Boot team for the amazing framework
- React community for excellent libraries
- Google for design inspiration
- All contributors
- Integrate real AI API (OpenAI)
- Add image upload
- Email notifications
- Social sharing
- Mobile app
- Real-time collaboration
- Advanced analytics
- Multi-language support
Found a bug or have questions?
- Issues: GitHub Issues
- Email: your.email@example.com
- Discussions: GitHub Discussions
If you found this helpful, please give it a β on GitHub!
Made with β€οΈ using Spring Boot and React



