Git Product home page Git Product logo

para's Introduction

Logo

A general-purpose backend framework for the cloud.

Build Status Maven Central Join the chat at https://gitter.im/Erudika/para

Para is a simple and modular backend framework for object persistence and retrieval. It helps you build and prototype applications faster by taking care of backend operations. It can be a part of your JVM-based application or it can be deployed a standalone, multitenant API server with multiple applications and clients connecting to it.

The name "pára" means "steam" in Bulgarian. And just like steam is used to power stuff, you can use Para to power your mobile or web application backend.

See how Para compares to other open source backend frameworks.

This project is fully funded and supported by Erudika - an independent, bootstrapped company.

Features

  • RESTful JSON API secured with Amazon's Signature V4 algorithm
  • Database-agnostic, designed for scalable data stores (DynamoDB, Cassandra, MongoDB, etc.)
  • Full-text search (Lucene, Elasticsearch)
  • Distributed object cache (Hazelcast)
  • Multitenancy - each app has its own table, index and cache
  • IoT support and integration with AWS and Azure
  • Flexible security based on Spring Security (LDAP, social login, CSRF protection, etc.)
  • Stateless client authentication with JSON Web Tokens (JWT)
  • Simple but effective resource permissions for client access control
  • Robust constraint validation mechanism based on JSR-303 and Hibernate Validator
  • Per-object control of persistence, index and cache operations
  • Modular design powered by Google Guice and support for plugins
  • I18n utilities for translating language packs and working with currencies
  • Standalone executable WAR with embedded Jetty
  • Para Web Console - admin user interface

Architecture

+----------------------------------------------------------+
|                  ____  ___ _ ____ ___ _                  |
|                 / __ \/ __` / ___/ __` /                 |
|                / /_/ / /_/ / /  / /_/ /                  |
|               / .___/\__,_/_/   \__,_/     +-------------+
|              /_/                           | Persistence |
+-------------------+  +-----------------+   +-------------+
|      REST API     |  |     Search      |---|    Cache    |
+---------+---------+--+--------+--------+---+------+------+
          |                     |                   |
+---------+---------+  +--------+--------+   +------+------+
|  Signed Requests  |  |  Search Index   |   |  Data Store |
|  and JWT Tokens   |  | (ElasticSearch) |   |    (Any)    |
+----+---------^----+  +-----------------+   +-------------+
     |         |
+----v---------+-------------------------------------------+
|  Clients : JavaScript, PHP, Java, C#, Android, iOS, etc. |
+----------------------------------------------------------+

Documentation

Hosting

We offer hosting and premium support at paraio.com where you can try Para online with a free developer account. Browse and manage your users and objects, do backups and edit permissions with a few clicks in the web console. By upgrading to a premium account you will be able to scale you projects up and down in seconds and manage multiple apps.

Quick Start

  1. Download the latest executable WAR
  2. Execute it with java -jar -Dconfig.file=./application.conf para-X.Y.Z.war
  3. Call curl localhost:8080/v1/_setup to get the access and secret keys
  4. Open Para Web Console or integrate with one of the API clients below.

Configuration properties belong in your application.conf file. Here's an example configuration for development purposes:

# the name of your app
para.app_name = "My App"
# or set it to 'production'
para.env = "embedded"
# if true, users can be created without verifying their emails
para.security.allow_unverified_emails = false
# if hosting multiple apps on Para, set this to false
para.clients_can_access_root_app = true
# no need for caching in dev mode
para.cache_enabled = false
# change this to a random string
para.app_secret_key = "b8db69a24a43f2ce134909f164a45263"
# enable API request signature checking
para.security.api_security = true

The quickest way to interact with Para is through the command-line tool (CLI):

$ npm install -g para-cli
$ para-cli ping
$ echo "{\"type\":\"todo\", \"name\": \"buy milk\"}" > todo.json
$ para-cli create todo.json --id todo1 --encodeId false
$ para-cli read --id todo1
$ para-cli search "type:todo"

Building Para

Para can be compiled with JDK 8:

To compile it you'll need Maven. Once you have it, just clone and build:

$ git clone https://github.com/erudika/para.git && cd para
$ mvn install -DskipTests=true

To generate the executable "uber-war" run $ mvn package and it will be in ./para-war/target/para-x.y.z-SNAPSHOT.war. Two WAR files will be generated in total - the fat one is a bit bigger in size.

To run a local instance of Para for development, use:

$ mvn -Dconfig.file=./application.conf spring-boot:run

Standalone server

You can run Para as a standalone server by downloading the executable WAR and then:

$ java -jar para-X.Y.Z.war

The you can browse your objects through the Para Web Console console.paraio.org. Simply change the API endpoint to be your local server and connect your access keys. The admin interface is client-side only and your secret key is never sent over the the network. Instead, a JWT access token is generated locally and sent to the server on each request.

Alternatively, you can grab the WAR file and deploy it to your favorite servlet container.

Maven dependency

You can also integrate Para with your project by adding it as a dependency. Para is hosted on Maven Central. Here's the Maven snippet to include in your pom.xml:

<dependency>
  <groupId>com.erudika</groupId>
  <artifactId>para-server</artifactId>
  <version>{see_green_version_badge_above}</version>
</dependency>

For building lightweight client-only applications connecting to Para, include only the client module:

<dependency>
  <groupId>com.erudika</groupId>
  <artifactId>para-client</artifactId>
  <version>{see_green_version_badge_above}</version>
</dependency>

Command-line tool

$ npm install -g para-cli

API clients

Use these client libraries to quickly integrate Para into your project:

Database integrations

Use these DAO implementations to connect to different databases:

Search engine integrations

The Search interface is implemented by:

Cache integrations

The Cache interface is implemented by:

  • Hazelcast: HazelcastCache default (included in para-server)
  • In-memory: objects can be cached in the JVM heap

Projects using Para

Wishlist / Roadmap

  • DAO implementation for PostgreSQL.
  • MongoDB implementation of Search
  • Make the API server more efficient with fibers (Quasar)
  • OpenAPI 3+ compatible API at /v2 (not soon)

Contributing

  1. Fork this repository and clone the fork to your machine
  2. Create a branch (git checkout -b my-new-feature)
  3. Implement a new feature or fix a bug and add some tests
  4. Commit your changes (git commit -am 'Added a new feature')
  5. Push the branch to your fork on GitHub (git push origin my-new-feature)
  6. Create new Pull Request from your fork

Please try to respect the code style of this project. To check your code, run it through the style checker:

mvn validate

For more information see CONTRIBUTING.md

License

Apache 2.0

para's People

Contributors

albogdano avatar songdongsheng avatar gitter-badger avatar

Watchers

James Cloos avatar

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.