piratepx / App
Projects that are alternatives of or similar to App
Sign up for free at https://www.piratepx.com!
This repository contains both the backend and frontend of the app to simplify development and deployment. Other than a few lines of configuration here and there to make this possible, however, they're pretty much separate codebases.
The backend is a JSON REST API built in Node.js using Fastify and Objection.js. It persists data to a PostgreSQL database.
The source code is located in the
api directory, with configuration
files in the root of this repository (where this README lives).
The frontend is a single-page app built with Vue.js and Tailwind CSS.
The source code is fully isolated in the
web directory, which is also
where its own configuration files are located.
The following includes the necessary steps to get the full app setup for
development, with a focus on backend-specific details. See
web/README.md for frontend-specific details.
- PostgreSQL >= v11
Docker Compose is used to run PostgreSQL as
docker-compose.yml. Once installed, simply
$ docker-compose up
The app itself is not run in a Docker container in development, as it's easy enough to install the necessary version of Node.js with nvm:
$ nvm install
Install dependencies with npm:
$ npm install $ cd web && npm install
dotenv is used to load environment
variables from a
.env file into
process.env. This file is ignored by version
control to prevent committing secrets.
.env.dist for an example.
Ensure PostgreSQL is running, then:
$ npm run dev:db:create
Knex.js is used to manage database migrations,
which are located in
To run the latest migrations:
$ npm run knex migrate:latest
Start both the backend and frontend development servers:
$ npm run dev
Code Style & Linting
Prettier is setup to enforce a consistent code style. It's highly recommended to add an integration to your editor that automatically formats on save.
ESLint is setup with the "recommended" rules to enforce a level of code quality. It's also highly recommended to add an integration to your editor that automatically formats on save.
To run via the command line:
$ npm run lint
After development is done in the
development branch and is ready for release,
it should be merged into the
master branch, where the latest release code
lives. Release It! is then used to
interactively orchestrate the release process:
$ npm run release