Skip to content

Fullstack CMS built with React 19, Vite, Express, and SQLite. Passport.js for auth.

License

Notifications You must be signed in to change notification settings

jennifert/archer-cms

Repository files navigation

Archer CMS

MIT License SQLite React Build with Vite Node.js npm

A modernized full-stack content management system built with React (Vite), Express, SQLite (via Sequelize), and Passport for authentication.


📄 License

This project is licensed under the MIT License.

You are free to:

  • ✅ Use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software
  • ✅ Use the project for personal, educational, internal, or commercial purposes
  • ✅ Credit is appreciated but not legally required
  • ❌ The software is provided "as is", without warranty of any kind

For details, see the LICENSE file.


🚀 Features

  • SQLite via Sequelize (replaces MongoDB)
  • React + Vite (replaces Gulp & Browserify)
  • Passport local auth with bcrypt
  • Role-based architecture (admin/author/viewer)
  • Image upload seeding (with .gitkeep protection)
  • Accessible and testable frontend
  • Modern ESLint config for React projects

🛠 Tech Stack

  • Frontend: React 19, Vite, Tailwind CSS
  • Backend: Express.js, Passport (local strategy)
  • Database: SQLite (via Sequelize ORM)
  • Authentication: bcrypt + Passport.js
  • File Uploads: Multer (local, seed images supported)

📦 Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (version 22 or higher)
  • npm (version 10 or higher)
  • Git CLI for cloning
  • SQLite (auto-created via Sequelize — no setup needed)

Optionally:

  • VS Code + ESLint/Tailwind extensions

🧭 Project Structure (WIP)

  • /client -> React + Vite frontend
  • /server -> Express routes and auth
  • /public/images -> Uploaded content (not tracked by git)
  • /seed_assets -> Images for database seeding
  • .env -> Environment config

⚙️ Getting Started

  1. Clone the Repository

    git clone https://github.com/jennifert/archer-cms.git
    cd archer-cms
  2. Install Dependencies

    npm install
  3. Set Up Environment Variables Create a .env file in the project root with the following:

    NODE_ENV=development          # Can be 'development' or 'production'
    PORT=5000                     # Server port
    COOKIE_SECRET=changeme123     # Used to sign session cookies
    COOKIE_SECURE=false           # Set to true in production with HTTPS
    COOKIE_SAMESITE=lax           # Recommended: 'lax' or 'strict'

    💡 For production, make sure to change COOKIE_SECRET to something long and secure.

    📄 See env.example for the latest template.

  4. Add a Sample Image Place a test image in:

    /seed_assets/sample1.jpg
    
  5. Seed the Database Safe prompt:

    npm run seed:safe

    Or force seed:

    npm run seed
  6. Start Development Server

    npm run dev

📜 NPM Scripts

Command Description
npm run dev Starts Vite (frontend) and Nodemon (server)
npm run seed Force seeds the database
npm run seed:safe Safe seeding with confirmation prompt
npm run build Builds frontend and runs postbuild scripts
npm run serve Serves the production frontend build

✅ Notes

  • The database (db.sqlite) and uploaded images (public/images/) are auto-generated during seeding.
  • .gitkeep is used to track empty folders for uploads.
  • Modify import.js to customize your seed content.

✍️ Rich Text Editor

Editor: TBD

This CMS supports WYSIWYG editing via Example.
To customize behavior or sanitize output, see /src/components/______.jsx.


📘 Documentation

  • TODO.md — Roadmap and planned enhancements
  • API_REFERENCE.md — Full list of backend API routes
  • /api/settings/endpoints — Dev-only route that returns all current Express routes dynamically

🚢 Deployment (Coming Soon)

TBD


📌 TODO Highlights

See TODO.md for full roadmap.

  • Add role-based route protection (requireRole('admin'))
  • Password strength validation
  • Integration testing (Jest/Vitest)
  • Production build + deploy (Render, Docker, etc.)

💎 Acknowledgments

This project would not be possible without these fantastic community resources:

About

Fullstack CMS built with React 19, Vite, Express, and SQLite. Passport.js for auth.

Topics

Resources

License

Stars

Watchers

Forks