Logo

Artwit

A simple website about art

Artwit is a simple Node.js web application for dynamic content that includes a blog. It was created as the basis for Generatia Tech, but everyone is welcome to use it. The implementation strives to be simple and free of unnecessary dependencies.

Goals

This project aims to use a blog and add resources for the field of Art. It is intended for everyone who wants to publish their art together with a description. Users must be logged in first, to then be able to use this blog site. It is a simple site that can be used by anyone.

Features

  • An easy way to create a simple, secure website with a blog
  • Support for text-based and photo-based blog formats
  • Easy authoring in HTML, Markdown (with code formatting), or JSON
  • Ordering of posts by publish date or content date
  • Easy customization of site layout and formatting

Structure

  • /app.js Entry point for the application, configures the server and static/dynamic content
  • /blog.js Implementation of the blog, titles, authors
  • /config Environment variables used to control basic behavior
  • /routes Define the endpoints at which requests can be made. Route paths can be strings, string patterns, or regular expressions.
  • /models Blog, Users schema used for defining validations or sanitizations on requests.

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

SESSION_SECRET = keyboard cat

PORT = 3000

COOKIE_NAME = ArtBlogSecure

MONGODB = CHANGE_HERE (MongoDB API)

Installation

1. Install Node.js
2. Fork and clone repository
3. Create directory under `/blog` or use one of the samples
4. Add static content to `/blog/yoursite/static`
5. `npm install`
6. `npm run compile`
7. `npm start`
8. Open <http://localhost:3000/> and verify
9. Commit changes to repository
10. Deploy repository to hosting service

Configuration

  • In folder config create keys.js file
  • add & change the CHANGE_HERE value from keys.js;

Here: module.exports = { MongoURI: CHANGE_HERE, }

Run Locally

Clone the project

  git clone https://github.com/timi-petre/artwit.git

Go to the project directory

  cd artwit

Install dependencies

  npm i

Start the server

  npm run start

Screenshots

Welcome Page
Login Page
Home Page
Latest Page
Create Article Section
Create Page
Dashboard Page

Contributing

Contributions are always welcome!

The main purpose of this repository is to continue evolving this project, making it faster and easier to use. Development of Artwit happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements.

Examples of behavior that contributes to creating a positive environment include:

1. Using welcoming and inclusive language
2. Being respectful of differing viewpoints and experiences
3. Gracefully accepting constructive criticism
4. Focusing on what is best for the community
5. Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

1. The use of sexualized language or imagery and unwelcome sexual attention or advances
2. Trolling, insulting/derogatory comments, and personal or political attacks
3. Public or private harassment
4. Publishing others’ private information, such as a physical or electronic address, without explicit permission
5. Other conduct which could reasonably be considered inappropriate in a professional setting

Easy way

  • Open issue, discuss proposal
  • Fork and clone repository
  • Change code and update tests
  • npm test
  • npm run lint
  • Review changes
  • Send pull request

Thanks to Open Source Code of Conduct and React

Dependencies

Project Home Page
Express https://expressjs.com/
NodeJS https://nodejs.org/en/
MongoDB https://www.mongodb.com/
EJS https://ejs.co/
Passport.js https://www.passportjs.org/
Bootstrap https://getbootstrap.com/

Usage/Examples

const router = require('express').Router()
const flash = require('connect-flash')
const passport = require('passport')
const session = require('express-session')

require('./passport')(passport)

router.use(flash())
router.use(
    session({
        secret: process.env.SESSION_SECRET,
        resave: false,
        saveUninitialized: false,
    }),
)
router.use(passport.initialize())
router.use(passport.session())

module.exports = {
    authenticate(req, res, next) {
        if (req.isAuthenticated()) {
            return next()
        }
        req.flash('error_msg', 'Please log in to view this page')
        res.redirect('/login')
    },

    notAuthenticate(req, res, next) {
        if (req.isAuthenticated()) {
            return res.redirect('/index')
        }
        next()
    },
}

Documentation

Documentation

Tema: Blog despre Arta

Entitate: Articole

Campuri:

Categorii Titlu Categoriei
Articole titlu,imagine, descriere, id, Data Adaugarii, buton Articol(adaugare, stergere, actualizare),login,register.

Special thanks to Victor Locoman

Badges

Github Stars Issues Commits

Add badges from somewhere like: shields.io

Authors

Support

For support, email timoteisorin.petre@gmail.com or join my Discord channel.

Feedback

If you have any feedback, please reach out to us at timoteisorin.petre@gmail.com