Skip to content

LinkNexus/Symfony-Blog

Repository files navigation

Symfony Blog

A Facebook-like app for individuals and teams with powerful functionalities for team work and organization. Made in Symfony, a popular PHP Framework for its base and core functionalities on the server side.


Table of Contents


Features

  • Symfony Web Application - Uses Symfony for dynamic rendering of the html content.
  • Responsive Design - Adapts to different screen sizes (desktop, tablet, mobile).
  • Minimalist Styling - CSS-in-JS for a simple and clean look.

Demo

Check out the live demo here: Live Demo URL.


Getting Started

These instructions will guide you on how to set up and run the project locally.

Prerequisites

  • Node.js (version 16.x or above)
  • PHP (version 8.x or above)
  • npm (Node Package Manager)
  • Composer (PHP Package Manager)
  • Maker Bundle (For easy deployment)
  • Symfony CLI (Optional)

Installation

  1. Clone the repository:

       git clone https://github.com/LinkNexus/Symfony-Blog.git
    cd Symfony-Blog
  2. Create an .env file at the root of the project.

    touch .env
  3. In the .env.local file, override necessary environment variables. In case you have no mailing services, you can use mailpit which is very simple to use.

    MAILER_DSN=your mailer configuration
    REDIRECT_DESKTOP=http://symfony-blog.local.wip:8000
    REDIRECT_MOBILE=http://m-symfony-blog.local.wip:8000
    • Using MySQL
    DATABASE_URL="mysql://{your username}:{your password}@127.0.0.1:3306/{your database name}?serverVersion=8.0.32&charset=utf8mb4"
    • Using MariaDB
    DATABASE_URL="mysql://{your username}:{your password}@127.0.0.1:3306/{your database name}?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
    • Using PostgreSQL
    DATABASE_URL="postgresql://{your username}:{your password}@127.0.0.1:5432/{your database name}?serverVersion=16&charset=utf8"
  4. Create the database, migrations and modify the database

    • Using PHP
    mkdir migrations
    php bin/console make:migration
    php bin/console doctrine:migration:migrate
    • Using Symfony CLI
    mkdir migrations
    symfony console make:migration
    symfony console doctrine:migration:migrate
  5. Install the dependencies:

    npm install
    composer install
  6. Start the development server:

    php -S localhost:8000 -t public/
    npm run dev
  7. Open your browser and visit http://localhost:8000 to see the blog.


Usage

  • Styling: The styling is made by pure CSS.
  • Build for Production: Run npm run build to create an optimized production build in the build/ directory.