hossein-vejdani / fruits

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fruits!

Requirements

PHP 8 or later
Symfony CLI
Docker
Composer
Nodejs 16 or later

Clone the repository

Setup

git clone https://github.com/hossein-vejdani/fruits.git

Backend

Go to backend directory

cd backend

Run this command to install the required dependencies.

composer install

Run this commnad to start the PostgreSQL database and mail server.

docker-compose up -d

Run this command to create database.

symfony console doctrine:database:create

Run this command to migrate the database schema.

symfony console doctrine:migrations:migrate

To fetch initial data and save it to the database run:

symfony console fetch-fruits 

Run this command to start the development server on port 8000.

symfony server:start -d

Frontend

Go to frontend directory and open terminal

Then make sure to install the dependencies:

# yarn
yarn install

# npm
npm install

# pnpm
pnpm install

Development Server

Start the development server on http://localhost:3000

npm run dev

Production

Build the application for production:

npm run build

Locally preview production build:

npm run preview

Run unit test

npm run unit:test

Notes

The database credentials are set in the .env file.
To stop the Docker container, run docker-compose down.
To view the database, you can use a PostgreSQL client such as pgAdmin or DBeaver. The database is running on port 5432.

About


Languages

Language:PHP 32.0%Language:HTML 29.3%Language:Vue 14.2%Language:JavaScript 10.7%Language:TypeScript 7.6%Language:CSS 6.1%