Skip to content

Latest commit

Β 

History

History
101 lines (79 loc) Β· 3.02 KB

File metadata and controls

101 lines (79 loc) Β· 3.02 KB

LAPIS

A thoughtful, literary blog platform where anyone can write and share stories, essays, and ideas. Built with Vue 3 and powered by the Blog Post API.

πŸ”— Live: lapis-blush.vercel.app


✨ Features

  • πŸ“– Browse and read posts from all users
  • ✍️ Write and publish your own posts
  • πŸ” Register and log in with JWT authentication
  • πŸŒ— Light / dark theme toggle
  • πŸ“„ Paginated post feed
  • πŸ›‘ Admin dashboard to manage and delete posts

πŸ›  Tech Stack

Layer Technology
Framework Vue 3 (Composition API)
Routing Vue Router
State Management Pinia
HTTP Client Axios
Build Tool Vite
Hosting Vercel

πŸ“ Project Structure

src/
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ api.js          # Axios Setup
β”‚   β”œβ”€β”€ auth.js         # Auth API calls (login, register, profile)
β”‚   └── posts.js        # Posts API calls
β”‚   └── comments.js     # Comments API calls
β”œβ”€β”€ assets/
β”‚   └── main.css        # Global CSS
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ Admindasbhoard.vue    # Admin Dashboard component
β”‚   β”œβ”€β”€ Createpost.vue        # Create Post component
β”‚   β”œβ”€β”€ Home.vue              # Home Page component
β”‚   β”œβ”€β”€ Navbar.vue            # Navbar component
β”‚   β”œβ”€β”€ Postdetail.vue        # Post Details component
β”‚   β”œβ”€β”€ Profile.vue           # Profile component
β”‚   β”œβ”€β”€ Register.vue          # Register component
β”‚   β”œβ”€β”€ Signin.vue            # Login component
β”‚   └── Themetoggle.vue       # Dark/light toggle component
β”‚   β”œβ”€β”€ Usetheme.js           # Theme composable
β”œβ”€β”€ router/
β”‚   └── index.js        # Vue Router config
β”œβ”€β”€ stores/
β”‚   β”œβ”€β”€ auth.js         # Auth state (Pinia)
β”‚   └── posts.js        # Posts state (Pinia)
β”œβ”€β”€ views/
β”‚   β”œβ”€β”€ HomePage.vue          # Post feed with pagination
β”‚   β”œβ”€β”€ LoginView.vue         # Login page
β”‚   β”œβ”€β”€ Register.vue          # Register page
β”‚   β”œβ”€β”€ CreatePostView.vue    # Create post page
β”‚   β”œβ”€β”€ PostDetailView.vue    # Single post view
β”‚   β”œβ”€β”€ CreatePostView.vue    # Create post form
β”‚   └── AdminDashboard.vue    # Admin post management
└── App.vue
└── main.js

πŸš€ Getting Started

πŸ§ͺ Test Credentials

Try the app using these demo accounts:

πŸ‘€ Regular User

Field Value
Email slowreader@example.com
Password admin1234

πŸ›‘ Admin

Field Value
Email edrylp@gmail.com
Password admin1234

πŸ›‘ Admin Access

Users with role: "admin" in the database can access the admin dashboard at /admin. From there, admins can delete any post on the platform.


πŸ”— Related