Code Monkey home page Code Monkey logo

magicjournal's Introduction

MagicJournal is a blogging platform with an accent on photography content. It separates posts into three main categories: articles, photos and galleries.
Articles are text posts that allow embedding different elements, such as images, videos, files. Articles can be formatted with custom BBCode.
Photos are posts that have a brief description (1000 characters) and a single image.
Galleries also have a brief description (1000 characters) and a collection of images.

Geo Data

All posts can be tied to a specific location. Users can see the posts on the map.

Post Relation System

Relations get displayed in a side panel in the post view. There are two categories of relations.
An article can use an image from other gallery. In that case, an Associated connection will be automatically created between the article and the gallery.
A manual connection, called Related, can be created between any two posts.

Mobile and Desktop compatible template

Website template is optimized for both handheld devices and desktop.

Admin

Content is managed through the administration panel. More users with various privileges can be created.

To get this code running:

  1. Make sure that you have the following installed:

    • Java 14+ (because of latest gradlew updates, probably Java 17)
    • PostgreSQL (12+)
    • GIT

    Download the latest version of tomcat archive from http://tomcat.apache.org/

  2. Get the source code: git clone https://github.com/Alasdair1907/MagicJournal.git

  3. Set up SQL:

    • Create a database (in this example, database is demodb with user demo and password demo123)
    • Put database info into the hibernate config at /src/main/resources/hibernate.cfg.xml
      Edit these lines:

    <property name="connection.url">jdbc:postgresql://localhost:5432/demodb</property>
    <property name="connection.username">demo</property>
    <property name="connection.password">demo123</property>

    • Create the tables by executing the sql script at /src/misc/create-tables.postgres.sql:
      psql -U demo -h localhost -d demodb -f create-tables.postgres.sql
  4. Copy contents of the tomcat lib folder (the one inside the downloaded tomcat archive) to the project's /lib folder

  5. Build the project:
    ./gradlew build
    (on windows, gradlew.bat build)

    If the project has been built successfully, you will see the following message: BUILD SUCCESSFUL

  6. Deploy .WAR file
    You will find the compiled Web ARchive (.war) file in the /build/libs/ directory.
    You can simply copy it to the webapps folder of tomcat, name it ROOT.war (make sure that there is no directory named ROOT), and run the tomcat from the bin folder by executing ./catalina.sh run

  7. Set up the vital parts of the blog:

    • Make a folder for image and file storage, for example, at /home/user/imageStorage and /home/user/fileStorage
    • In your browser navigate to localhost:8080/admin, log in as 'admin' with password 'password' Click 'Settings'

    Edit these settigns:

    • Image Storage Path (for example /home/user/imageStorage)
    • Storage Path for Non-Image Files (for example /home/user/fileStorage)
    • Set the dimensions for preview images (1280 recommended) and thumbnail images (800 recommended)

You can change background and logo by changing /web/template/background.jpg and /web/template/logo-full-white.png

magicjournal's People

Contributors

alasdair1907 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.