Skip to content

codekeyz/dart-blog

Repository files navigation

Dart Blog 🚀

dart Release codecov

Full-stack Dart project meant to prove that Dart for Backend is highly possible in the simplest form if we put in the work and necessary support. The Backend runs on Yaroo which serves both the frontend Flutter Web and API.

Screenshot 1 Screenshot 2

Setup

Install Melos as a global package via pub.dev

$ dart pub global activate melos

then initialize the workspace using the command below

$ melos bootstrap

Build

This project consists of a Backend using Yaroo & Flutter Web for the frontend. You'll need to run this command so Flutter web can be bundled into the public folder.

$ melos build:backend

Migrate Database

Prepare the database (default: SQLite) by running the command below. This will create the necessary tables in the database. You can change the database by editing the config/database.dart file. MariaB and MySQL are supported for now. PostgreSQL coming soon.

$ dart run bin/tools/migrator.dart migrate

NB: There are only 3 commands for now. migrate, migrate:reset and migrate:rollback and they do exactly what they are called.

$ dart run bin/tools/migrator.dart <command-goes-here>

Start Server

$ dart run

Tests

$ dart test

Contribution & Workflow

We rely heavily on code-generation. Things like adding a new Entity, Middleware, Controller or Controller Method require you to re-run the command below.

$ dart pub run build_runner build --delete-conflicting-outputs

Contributors 2

  •  
  •