A simple blog with CMS made with React, Express and MongoDb.
Demo here: https://blog-cms-julien-sebag.herokuapp.com/
Download the project, run npm install && cd client && npm install
, then create a .env
file in the root folder with this data:
PORT=5005
ORIGIN=http://localhost:3000
MONGODB_URI=mongodb://localhost/blog-cms
[email protected]
WORD=YourPassword
TOKEN_SECRET=RanDomSecREtKey42
CLOUDINARY_NAME=your-cloudinary-name
CLOUDINARY_KEY=your-cloudinary-key
CLOUDINARY_SECRET=your-cloudinary-secret
Then run db/seeds/create-empty-global.js
to create an empty MongoDb collection with global data.
If you want to create fake data, you can use the json files in the db
folder. Simply import all the files to MongoDb.
Log in to the admin panel at the address /dashboard/login
. If you use the fake data provided, you can use these credentials to log in:
email: [email protected]
password: Password42
- Users can sign up and login, but can not access the dashboard before an admin approves them
- User roles: users can either be a writer (who can only add, edit or delete posts), a moderator (writer features, plus delete comments), and admin (writer and moderator features, plus edit global pages and users)
- Add / delete posts
- Add / delete global pages
- Post comments to posts
- Contact form, to the specified address in dashboard
This app uses a markdown editor for the posts. To add React components to use inside, you can add them to the page /client/src/config/markdownConfig.js
inside the const markdownConfig/overrides
.