Skip to content
Constructor of emails on react, php and SQLite
TypeScript TSQL PHP HTML Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
db
react
schema
scripts
server
.gitignore
.travis.yml
README.md

README.md

Postcards editor for emails

Build Status

Application using Slim(PHP), React(TypeScript) & SqlLite

Online demo:

http://postcards.shagg.ru/

Requirements:

  • php >= 7.2
  • nodejs >= 10.12.0

Usage

preparations:

  • git clone

  • cd server

  • run ./scripts/build-app.sh !!!ATTENTION!!! Only if it is your first installing this app run ./db/full.sh && ./db/fixture.sh in command line. This actions create database(OR RECREATE EXISTING DATABASE)

  • Set secret in the ./server/.settings.php

to deploy a build on a server:

  • The root of the application is /server/public/index.php
  • Nginx must have the param fastcgi_param SCRIPT_NAME equal to /index.php;
  • Before the first usage, you need to execute ./db/full.sh
  • If we have changes after a commit in /react directory, we need to execute cd react && npm i && npm run build:prod or /scripts/install-js-dependencies.sh && ./scripts/compile-react.sh these actions are equal.
  • If we have changes in /server/composer.json or /server/composer-lock.json, then we need to execute cd server && composer install or ./scripts/install-php-dependencies.sh
  • The easiest way is to run ./scripts/build-app.sh after each commit, but it will make all of the above every time and this way is not preferred.

To run tests:

All tests

./scripts/tests.sh

Server

./server/tests/run.sh

Client

cd react
npm t

To run app:

./scripts/demo.sh

Application is running on the 8080 port

To run react app in the dev mode (watch files changes):

cd react
npm start
You can’t perform that action at this time.