@casejs/case
TypeScript icon, indicating that this package has built-in type declarations

3.0.5 • Public • Published

CASE

A complete backend without leaving your IDE

npm CodeFactor Grade Discord Support us Licence MIT

CASE App

What is CASE ?

CASE is a Typescript lightweight BaaS (Backend As A Service) requiring minimal coding.

It provides a complete backend to your client app without the hassle that comes with it.

Key features

  • Instant backend with DB, REST API and Admin panel without any configuration
  • 🧠 Smart SDK to import in your favorite JS front-end
  • 🛠️ Essential features like Auth, Storage, Validation and Hooks

Forget about drag-and-drop visual builders

With CASE, you structure your data using TypeScript classes straight from your coding environment.

// entities/cat.entity.ts
@Entity()
export class Cat extends BaseEntity {
  @Prop()
  name: string

  @Prop({
    type: PropType.Date
  })
  birthDate: Date

  @Prop({
    type: PropType.Relation,
    options: {
      entity: Owner
    }
  })
  owner: Owner
}

Effortless integration in your client app

And allow the following code in your JS client built with your favorite stack: React, Svelte, Angular, Vue or any front-end. You can even use it in NodeJS.

import CaseClient from '@casejs/case-client'

// Init SDK
const cs = new CaseClient()

// Get all cats with their owner
const cats = await cs.from('cats').with(['owner']).find()

// Filter cats.
const cats = await cs
  .from('cats')
  .where('breed = siamese')
  .andWhere('birthDate > 2020-01-01')
  .find()

// Create a new cat.
const newCat = await cs.from('cats').create({
  name: 'Milo',
  age: 2
})

// Upload.
const fileUrl: string = await cs.from('cats').addFile(file)

// Login.
await cs.login('users', 'user1@case.app', 'case')

Getting started

Prerequisites

  • NodeJS (v16.14.0 or higher). The recommended version is 18.x.

Create your CASE project

Run the following on your terminal replacing my-case-app with your app's name:

npx create-case-app my-case-app

Then serve the app locally:

cd my-case-app
npm start

🎉 Your backend is ready !

You can now:
- See your Admin panel at http://localhost:4000
- Use your REST API at http://localhost:4000/api

You can now go through the docs to build your next block.

Community & Resources

  • Docs - Learn CASE features
  • Discord - Come chat with the CASE community
  • Dev.to - Stay tuned to CASE developments
  • Github - Report bugs and share ideas to improve the product.

Contributors

Thanks to our first wonderful contributors !

Package Sidebar

Install

npm i @casejs/case

Weekly Downloads

154

Version

3.0.5

License

MIT

Unpacked Size

2.6 MB

Total Files

196

Last publish

Collaborators

  • brunobuddy