Coder Social home page Coder Social logo

bitloops / bitloops-language Goto Github PK

View Code? Open in Web Editor NEW
339.0 8.0 15.0 14.14 MB

Open-source transpiled programming language that helps you write clean code, well-designed systems, and build high-quality software that is testable, auditable and maintainable. Like what you see? Don't forget to star! :star: ^^^

Home Page: https://bitloops.com/bitloops-language

License: GNU General Public License v3.0

TypeScript 98.28% JavaScript 0.35% ANTLR 1.27% Shell 0.10%
ddd ddd-architecture ddd-example transpiler bitloops bitloops-language bdd bdd-tests behavior-driven-development domain-driven-design

bitloops-language's Introduction

Bitloops

Bitloops

Bitloops is a scalable open source Firebase substitute that can support any database and workflow orchestration. We’re building Bitloops using enterprise-grade open source tools so that you can build any type of enterprise-grade application 10x faster that will connect and serve your web, mobile, desktop, or server applications seamlessly.

liveSync

liveSync

Create and update strongly-typed HTTP/2 REST APIs in seconds and use them instantly as RPCs on your client code with just a single line of code (only available for TypeScript projects currently)

Subscriptions to Realtime Events

Subscriptions

Bitloops allows your client code to subscribe to operations of any database or backend event with just a single line of code

Authentication

Authentication

Add powerful authentication to your clients with a single line of code

  • Backend-as-a-Service: authentication, realtime database, storage (soon), hosting, subscriptions and notifications, cloud infrastructure
  • Low-code (drag & drop) IDE that allows developers to build actual backend services using Picoservices or traditional Microservices or APIs
  • Instant code deployment into development, testing or production environments
  • Integration platform-as-a-service that allows integration of any application, microservice or 3rd party service

Bitloops removes the complexity and repetitiveness required to build and deploy a modern backend application, API or database from scratch and allows you to continue scaling and extending your applications faster than any other tool.

Using Bitloops, you can easily integrate your application with user authentication & multiple sign-in methods, integration of any database, data storage (soon), as well as hosting for your website. In addition, you can continue building new products and features, or iterate existing features / business logic 10x faster than with traditional tools.

Bitloops is the only platform you will need for all your backend needs. We are still at our early stages with much to do and a long backlog but with your support we will get there faster.

Why should I care?

  • liveSync: Your frontend is connected and synced with your backend even during development allowing for seamless integration (think of GraphQL Apollo on steroids)
  • Realtime Everything: Receive events on your frontend with a single line of code and turn all your databases into “realtime” ones
  • 10x Productivity: Creating APIs and backends just became 10 times faster as we take care of all the boilerplate and infrastructure
  • Authentication: Authentication with a single line of code
  • Hosting: Host and deploy your frontend application just by running "bitloops deploy”
  • Storage: Store your files
  • Scalability: We are building Bitloops with parallel processing and scalability in mind Everything scales horizontally on Kubernetes
  • Security: We ensure that best practices are followed in every step to ensure security in everything you build

Low-Code Workflow Orchestration & Picoservices Architecture - Why should I care?

  • Instant deployments: Deploy your backend changes to production in milliseconds
  • Reusability: Write only unique and high value code and maximize reusability
  • Powerful Collaboration Features: Develop in a collaborative way, Google Docs-style
  • Versioning & History: No need for repos and commits everything is stored automatically for you
  • Out-of-the-box EDA: Out of the box delivery guarantee strategies and error handling for Event Driven systems
  • Easy maintenance: Automatic package and library updates minimizing maintenance effort
  • Low-Code Business Logic: Write your business logic in a language agnostic and timeless manner using Low-Code diagrams
  • Polyglot Applications: Leverage any package and library written in any language - use the best for the job and create truly polyglot applications
  • Backwards Compatible: Connect your existing services and APIs using REST, gRPC, Kafka and more

Status

  • Alpha: We are testing Bitloops with a closed set of users - Low testing coverage, several bugs, missing features, UX experience suboptimal. We are aware of most important issues and we are wokring hard to fix them but we try to maintain the right balance between releasing fast and iterating with writing high quality code
  • Public Alpha - Community Edition - Coming Soon!: Anyone can sign up over at console.bitloops.com. But go easy on us ❤️ We have big dreams but we are a small team and we just started the project in July '21.
  • Public Alpha - Managed Backend-as-a-Service: Anyone can sign up over at console.bitloops.com.
  • Public Beta: Stable enough for most non-enterprise use-cases
  • Public: Production-ready

Installation

Prequisitions

  • node (we suggest to install via nvm)
nvm install node

In order to validate that the above are installed correctly, running the commands below at the terminal should return the corresponding versions:

node -v
docker -v
docker-compose -v

To check if docker is up and running you may check by running the command below, without getting an error:

docker ps

Step 1

# Install bitloops cli
npm install -g bitloops-cli

# or using yarn
yarn global add bitloops-cli

Step 2

# For user authentication
bitloops login

Step 3

# To create a workspace and give it a name 
# This may take a while the first time you run it, since it will have to pull the necessary images from Docker Hub. So please try to be a bit patient 🙏.

bitloops install -n "<Workspace Name>"

After the completion of this step, your Workspace Id will appear, in order to copy it and use it in the next step.

Step 4

# Establish a connection between bitloops console and your local installation
bitloops tunnel -w "<Workspace Id>"

Step 5

Visit the Bitloops Console, and login with Google with the same account you logged in during Step 2.

On Windows

You need to have a terminal which can run bash commands e.g. git bash, and use this to execute the bitloops commands. After install a restart may be required to be able to use docker commands.

On Linux

Currently this library uses libsecret so you may need to install it before running.
You should follow Step 1 from above, then depending on your distribution, you will need to run the following command:

  • Debian/Ubuntu: sudo apt-get install libsecret-1-dev
  • Red Hat-based: sudo yum install libsecret-devel
  • Arch Linux-based:
    • sudo pacman -S libsecret
    • sudo pacman -S gnome-keyring

Continue with Step 2, 3, 4 and 5 from above.

Contents

Bitloops' monorepo contains the following projects:

Licenses

Each project in this repo contains licensing information specific to that project.

bitloops-language's People

Contributors

a-katopodis avatar danias avatar dependabot[bot] avatar depfu[bot] avatar ellik95 avatar fossabot avatar frostedpenguin avatar giorgosnty avatar sardounis avatar sergiobitloops avatar sergiopreira avatar traigor avatar ukijo avatar varagos avatar zogart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitloops-language's Issues

Differentiate between return statements

Note: please check if a similar issue already exists. Also, if you have a question, please use the GitHub Discussions or join our Slack Community

Subject of the issue

We would like to have support for returnOK,returnError when return type is applicable and the statement is one of those two.
In the rest cases simple return should remain.

Repo Adapter is not generated

Subject of the issue

DI is importing the mongo repo Adapter, but the file concretion is missing.
The path is import { TodoWriteRepoPortMongoAdapter } from './infra/repos/TodoWriteRepoPortMongoAdapter';

Imports are missing in generated TypeScript files

Subject of the issue

Imports are missing in generated TypeScript files

Steps to reproduce

Tell us how to reproduce this issue.
Feel free to provide a demo link or concise code sample, else provide steps, screenshots and/or files

Expected behaviour

TypeScript project should run using yarn start:dev without an issue

Actual behaviour

imports are missing from generated TypeScript files

Two getter methods are generated for Entity Ids in TypeScript generation

Subject of the issue

Two getter methods are generated for Entity Ids in TypeScript generation

Expected behaviour

Only one getter should be generated in the TypeScript file

Actual behaviour

class TodoEntity extends Entity<TodoProps> {
  private constructor(props: TodoProps) {
    super(props, props.id);
  }
  public static create(props: TodoProps): XOR<TodoEntity, never> {
    return ok(new TodoEntity(props));
  }
  get id() {
    return this._id;
  }
  get id(): UUIDv4 {
    return this.props.id;
  }
  get title(): TitleVO {
    return this.props.title;
  }
  get completed(): boolean {
    return this.props.completed;
  }
}

Fix ReadModelRepoPorts

Subject of the issue

ReadModel Repo Ports and Adapters are not defined properly

Steps to reproduce

Use it in bl as:
RepoPort TodoReadRepoPort<TodoReadModel> extends CRUDReadRepoPort;

Expected behaviour

It should be recognised and transpiled like RepoWritePort

Append .value to Either< > results

Subject of the issue

When we create something that returns an either, like a Value object, an entity etc... If the identifier is later used, it should be done using identifier.value to extract the result of the Either clause.
In the following example title.value and todo.value when we call the repo save method.

Expected behaviour

image

Actual behaviour

image

Support Error Evaluation

Note: please check if a similar issue already exists. Also, if you have a question, please use the GitHub Discussions or join our Slack Community

Subject of the issue

Error Evaluation is not currently supported

Steps to reproduce

Use Error Evaluation in BL e.g return DomainErrors.ExampleError();

Expected behaviour

It should be supported by the parser

Contribution / PR

If the bug is confirmed, would you be willing to submit a PR?
(Yes/No - and of course the Bitloops team would provide assistance in submitting a PR)

Your environment

  • version of Bitloops Language

Reverse then and else body in domain if checks

Subject of the issue

Change if checks inside useCase's execute method body.

Expected behaviour

image

Actual behaviour

image

Suggested solutions?

Expression should be reversed, and then-else bodies swapped probably
If then statement returns, we don't need to wrap the remaining code in an else statement, to avoid redundant nested if statements.

Multiple classes in bl files fail to generate target language

Subject of the issue

Multiple classes in bl files fail to generate target language. If one class is included it works but when a second one is added it is not generated. The model works fine but the visitor fails to processes multiple classes in a single request.

Expected behaviour

Multiple files should be generated for multiple classes even if they are all included in one bl file.

Actual behaviour

The visitor fails to processes multiple classes in a single request and only one target file is generated per bl file

Merge imports from same package

Expected behaviour

import { Domain, Either } from '@bitloops/bl-boilerplate-core';

Actual behaviour

import { Domain } from '@bitloops/bl-boilerplate-core';
import { Either } from '@bitloops/bl-boilerplate-core';

Suggested solutions?

Merge all related above problems

Build-in function applyRules in ValueObjects is not working

Subject of the issue

In a ValueObject, you should be able to use applyRules() to check if the ValueObject passes the rules checks

Expected behaviour

In a ValueObject, you should be able to use applyRules() to check if the ValueObject passes the rules checks

Await missing in useCase

Await is missing when we call a repo method, should be included for all the useCase dependencies method calls.

Domain error message

Subject of the issue

Domain Error message does not work with backtick strings (`)

Actual behaviour

It works fine with regular strings

Suggested solutions?

Need to add backticks to primitives, just as regular Strings are

Support VO for entity ids

Subject of the issue

Right now we only support UUIDv4. We need to support Value Objects too. This will need change in the boilerplate core package too.

Important documentation missing

Subject of the issue

Important documentation missing

Documentation needs to be updated both inside the repo for development purposes and contributions but also of the documentation website

Enhance tests in domain

Subject of the issue

Add more test in VOs, Entities, RootEntities, so that every case is covered

Docs links broken

Note: please check if a similar issue already exists. Also, if you have a question, please use the GitHub Discussions or join our Slack Community

Subject of the issue

Links for docs/slack are broken in the README.md

Steps to reproduce

Clicking the links from an editor works. But from Github it doesn't as it does add a (

Problem Source Code Location

README.md

Contribution / PR

If the bug is confirmed, would you be willing to submit a PR?
Yes

Fix TodoProps id type UUIDv4

Expected behaviour

Type for id should be id?: Domain.UUIDv4;

Actual behaviour

Type is id?: UUIDv4;

Suggestions

Make use of existing structs/mapping like
src/helpers/mappings.ts

export const BitloopsFixedClassTypesArray = [BitloopsFixedClassTypes.UUIDv4];

'this' has limitations inside bl constructor

Subject of the issue

this has limitations of usage inside the constructor. See an example below:

Steps to reproduce

If anyone types this in bl:

ValueObject TitleVO {
  constructor(props: TitleProps): (OK(TitleVO), Errors(DomainErrors.TitleOutOfBoundsError)) {
    const title = this.toUpperCase(props.title);
    applyRules(TitleOutOfBoundsRule(title));
  }

  private toUpperCase() {...}
}

In typescript will be generated this:

export class TitleVO extends Domain.ValueObject<TitleProps> {
  get title(): string {
    return this.props.title;
  }

  private constructor(props: TitleProps) {
    super(props);
    const title = this.toUpperCase(props.title);
  }

  public static create(props: TitleProps): Either<TitleVO, DomainErrors.TitleOutOfBounds> {
    const res = Domain.applyRules([new Rules.TitleOutOfBounds(title)]);
    if (res) return fail(res);
    return ok(new TitleVO(props));
  }

  private toUpperCase(title: string) {...}
}

Expected behaviour

I should be able to do something like the above in bl.

Actual behaviour

this.props.title in create will produce an error, because it is set in the static create method and this is not set yet.

Suggested solutions?

Redesign bl language to have both constructor and create in domain?

BitloopsParser (core) fails if there aren't spaces around some ( ) { }

Subject of the issue

BitloopsParser (core) fails if there aren't spaces around some ( ) { }

Steps to reproduce

Tell us how to reproduce this issue.
Feel free to provide a demo link or concise code sample, else provide steps, screenshots and/or files

Expected behaviour

The parser should not care about the lack of or existence of space around ( ) { }

Actual behaviour

Parser fails to match properly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.