Skip to content

htooaungphyolwin/AdonisJS-Blog

Repository files navigation

CMS AdonisJS

A Content Management System built with AdonisJS 6, featuring user authentication, posts management, comments, and view tracking.

Application Preview

Home Page

Home Page

Post Detail Page

Post Detail

User Profile Page

User Profile

Comments Section

Comments

Features

  • User authentication (registration and login)
  • User profiles with post statistics
  • Blog post creation and management
  • Post likes system
  • Comments functionality
  • View count tracking
  • Modern UI with Tailwind CSS and Flowbite

Prerequisites

  • Node.js (Latest LTS version)
  • npm or yarn package manager
  • SQLite (default database)

Installation

  1. Clone the repository

  2. Install dependencies:

    npm install
  3. Copy the environment file:

    cp .env.example .env
  4. Initialize SQLite database:

    The SQLite database file will be automatically created in the tmp folder when you run migrations. Make sure the tmp folder exists:

    mkdir tmp
    node ace migration:run

    The SQLite database file will be created at tmp/db.sqlite3.

Development

Start the development server:

npm run dev

The server will start at http://localhost:3333

Build

To build the application for production:

npm run build

Testing

Run the test suite:

npm run test

Project Structure

  • app/ - Application source code
    • controllers/ - Request handlers
    • middleware/ - HTTP middleware
    • models/ - Database models
    • validators/ - Form validation rules
  • config/ - Configuration files
  • database/ - Database migrations and seeders
  • resources/ - Frontend assets and views
  • start/ - Application bootstrap files
  • tests/ - Test suites

Available Scripts

  • npm run dev - Start development server with hot reload
  • npm run build - Build for production
  • npm start - Start production server
  • npm run test - Run tests
  • npm run lint - Run linter
  • npm run format - Format code with Prettier

Dependencies

Core

  • AdonisJS 6
  • SQLite
  • Edge Template Engine

Frontend

  • Tailwind CSS
  • Flowbite
  • Vite

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Content Management System built with AdonisJS 6, featuring user authentication, posts management, comments, and view tracking.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors