Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

nCent (API)


  • nCent Api
  • This api is to be used to interact with the nCent protocol.
  • Currently the logic is running via a traditional application structure.
    • We will be moving most of the protocol logic into a blockchain
  • Api Reference docs can be found here
  • Model docs can be found here
  • UML Diagrams can be found here

Tech stack:

  • Serverless, Kotlin, jUnit, exposed (mysql, auroraserverless), circleci


NOTE: Make sure you're using Java 8 (v1.8.*)

  1. Install it using npm:
git clone
cd ncnt/kotlin/kotlin-serverless
npm install serverless -g
npm init -f
npm install
  1. Create your project in

  2. To configure your AWS credentials execute serverless config credentials --provider aws --key EXAMPLE --secret EXAMPLEKEY

  3. mvn clean install

  4. ./ local


  1. Create AWS Serverless Aurora RDS DB and Create EC2 Instance to Access RDS DB
    • run make with the desired arguments
    • make name=NAME vpc_cidr= subnet1_cidr= subnet2_cidr= master_user_password=PASSWORD
    • copy the output key and create a pem file for using it on the ssh
    • change pem file permission as below
    • chmod 444 key.pem
  2. Add ncnt database to the newly created db
    • Connect to the ec2 instance
    • ssh -i <path to pem file> ec2-user@<ec2 public url>
    • Update yum
    • sudo yum update
    • Install mysql if it doesn’t exist (check by using mysql command)
    • sudo yum install mysql
    • mysql -h <aurora db cluster url> -P 3306 -u <dbusername> -p
    • Create database ncnt if it doesn’t exist
  3. Update serverless.yml
    • Vpc:, securityGroupIds, subnetIds
    • Environment: database_url, database_driver, database_user, database_password
    • For local env use after you have created a mysql database and added a ncnt db:
      • database_url: jdbc:mysql://localhost:3306/ncnt
      • database_driver: com.mysql.jdbc.Driver
      • database_user: root
      • database_password:
    • For production env use creds from above aws instances
  4. Setup env vars in serverless.yml and also add to AWS SMPS (ex: ${ssm:/ncnt/production/database/user})
  5. Install serverless
  6. Setup AWS Creds for Serverless Framework
  7. Create project in if it doesn’t already exist
  8. To deploy ./
    ./ local
    ./ production


  • Using circleci you can setup continuous integration and deployment. Look at /.circleci/config.yml
  • Current configuration depends on the following:
    • all new pull requests will auto build and test
    • all pushes to master branch will deploy to development env
    • all pushes to production branch will deploy to production env
    • after any deployment, postman tests will get triggered


  • Feel free to create pull requests in your own branch, include descriptions and tests.
  • Contact info: nCent


Contributions by:


Arya Soltanieh


No description, website, or topics provided.




No releases published


No packages published

Contributors 4