2.0 KiB
2.0 KiB
KantanCMS
A simple CMS with admin console and frontpage built with Next.js 14, TypeORM, and Tailwind CSS.
Features
- Next.js 14 with App Router
- TypeORM for database management
- Tailwind CSS for styling
- Docker Compose for development environment
- Support for multiple databases (MySQL, PostgreSQL, SQLite)
Database Structure
- User: id, username, password, avatar, modifiedAt, createdAt
- Posts: id, parentId, userId, title, content, modifiedAt, createdAt
Getting Started
Prerequisites
- Node.js 18+ and npm
- Docker and Docker Compose (optional, for running MySQL/PostgreSQL)
Installation
-
Clone the repository
git clone <repository-url> cd kantancms -
Install dependencies
npm install -
Copy the environment file and configure it
cp .env.example .env -
Start the development server
npm run dev -
Open http://localhost:3000 in your browser
Using Docker
-
Start the Docker containers
docker-compose up -d -
Access the application at http://localhost:3000
Database Configuration
By default, the application uses SQLite for development and testing. You can switch to MySQL or PostgreSQL by changing the DB_TYPE environment variable in your .env file or in the docker-compose.yml file.
Development
This project uses the dev branch for development. The main branch is reserved for stable releases.
# Switch to the dev branch
git checkout dev
# Create a new feature branch
git checkout -b feature/your-feature-name
# After making changes, commit and push to your feature branch
git add .
git commit -m "Description of your changes"
git push origin feature/your-feature-name
# When ready, merge to dev branch
git checkout dev
git merge feature/your-feature-name
License
This project is licensed under the MIT License - see the LICENSE file for details.