Welcome to the Project Walnut project. It is a simple webapp for small-startups to post their blogs, or news outlets for publishing news article
- User Authentication
- Sign up and login functionality using secure authentication. For editors, moderators and site admins(web master)
- Admins can disable or enable registration from site configurations
- CRUD Operations
- Create, read, update, and delete blog posts.
- proper access privilege for admin dashboard access
- Webmaster portal for maintaining site settings and global site config
- Markdown support in editors
- Comments Section
- Comments section
- Comments posting
- Comments to be turned off sitewide from global config
- Cloudflare Turnstile intregation for Bot attacks.
- AI Integration
- LLM Based Paraphrazer/Summarizer/TL;DR generation (In Beta Stage)
- Responsive Design
- Accessible on both desktop and mobile devices.
- Accessible Midnight/Daylight themed UI for better reading experience
- Frontend
- CSS3, JavaScript, EJS
- Services
- Node.js, Express.js
- Database: MongoDB with Mongoose ODM
- Backend
- Database: MongoDB with Mongoose ODM
- Clone the repository:
git clone https://github.com/Debagnik/project-walnut.git
- Navigate to the project directory:
cd project-walnut - Install dependencies:
npm install
- Configure the environment variables:
- Create a
.envfile and add your MongoDB URI and any other required configurations as below.### Must have to run this application MONGO_DB_URI=mongodb+srv://<test>@blog-site.hx49l.mongodb.net/<test> #Required PORT= #Optonal, defaults to 5000 JWT_SECRET=your-default-jwt-secrets #Required SESSION_SECRET=your-secure-session-secret #Required NODE_ENV=dev-local #Defaults to dev-local use production in production scenario DEFAULT_POST_THUMBNAIL_LINK=/img/placeholder.webp #Keep it as is MAX_TITLE_LENGTH=100 MAX_DESCRIPTION_LENGTH=10000 MAX_BODY_LENGTH=100000 TRACKING_SCRIPT_ERROR_MSG=<!--Invalid Tracking script, check with Developer--> #Required ## Enviroment variable Required if LLM Based Blog Summary generator is enabled. OPENROUTER_API_KEY=<Your OpenRouter API Key> #Optional OpenAI or OpenRouter Secret Key for AI Integration SYSTEM_PROMPT=You are an assistant editor that summarizes the blogpost body in #Required if AI Integration is enabled from webmaster. USER_PROMPT=Summarize the following blog written in Markdown (Absolutely limit your response to #Required if AI Integration is enabled from webmaster. USER_PROMPT_2=characters) do not add character/word count in the response. #Required if AI Integration is enabled from webmaster. LLM_MODEL=<The Model name supported by OpenRouter, e.g., "anthropic/claude-3-opus"> #Required if AI Integration is enabled from webmaster. LLM_BASE_URL=https://openrouter.ai/api/v1 # Required OpenRouter API base URL (Or use any OpenAI SDK compatible LLM Base url API) Leave as is if AI Integration is disbabled. ## Post Caching config POST_CACHE_MAX_SIZE=50 #defaults to 100 POST_CACHE_TTL=3600 #defaults to 3600 secs POST_HIT_RESET_INTERVAL_HOURS=24 #defaults to 24 hours.
- Create a
- Start the application:
or on Developer machine
npm start
npm run dev
- Access the application at
http://localhost:5000in your web browser. - Register a new account or log in with existing credentials.
- Create new blog posts, edit them, or delete if necessary.
- View and comment on other users' posts.
I welcome all enhancement and bugfix and issue reports. Please feel free to contibute If you are interested in contributing to this project:
- Fork the repository
- Create a branch from the latest release.
- Submit your pull request against the release branch.
- Please also label your PR (enhancement for adding features, Bugfix for for bug fixing PRs) PS: You contribution will be reviewed by codeRabbitAi and it's tone of review will be bit harsh I made it to sound like a Tsundere, but it sometimes come of rude.
This project is licensed under the MIT License.
For any questions or concerns, you can reach out at info@debagnik.in.
This project is enhanced by:
- CodeRabbitAI - Code review assistance
- ChatGPT - Google and Stack overflow alternative
