πŸŽ‰ Introducing yet another js framework, Blazze.js

Build your web apps with ease

Blazze.js enables you to write Typesafe API's for the web with ease and powerfull Rust-based JavaScript tooling for the fastest builds. It makes you complete your projects blazzingly fast.

What's in Blazze ?

All you need to write API's with ease & peace 😌

1Routing

Keep the logic separated without any setup. Routes are based on the directory structure.

2Powered by SWC

Super speed transpilation via the power of Rust.

3Request Caching

Blazze handles caching automatically to optimize large computations in both dev and prod envs.

4TypeScript

No configurations and environment setup, just get started directly

5Fast & Robust

Built on top of express, for better developer experience.

6Build Optimization

Makes a single optimized bundle for your app

7Easy Setup

Hit `npx blazze-init` to start building your projects.

8No Boiler Plate Code

Install, Init and start, no imports, nothing else πŸš€

Start Building with Blazze.js

Not a new framework for you to learn, Zero learning curve, built to enhance developer experience. Get started by checking out few foundational rules of blazze.
npm install blazze@latest -g >> npx blazze-init

What is your project named ? (myApp)
What will be root endpoint for your project ? (api/v1)
Would you like to use TypeScript ? (yes)
Which port should the server listen to ? (3000)
Where would you like to keep your static content like html, imgs, etc ? (public)
Would you like to enable request caching ?

1Create & Configure

Get started quickly with Blazze cli. You will be asked a few questions to configure blazze.config.js
YourBlazzeApp
β”œβ”€β”€ api/v1 (root-endpoint)
β”‚ β”œβ”€β”€ Route-1
β”‚ β”‚ β”œβ”€β”€ GET.ts
β”‚ β”‚ β”œβ”€β”€ POST.ts
β”‚ β”‚ β”œβ”€β”€ PUT.ts
β”‚ β”‚ β”œβ”€β”€ DELETE.ts
β”‚ β”‚ β”œβ”€β”€ PATCH.ts
β”‚ └── Other-routes / ...
β”œβ”€β”€ blazze (for typescript)
β”œβ”€β”€ cache (if enabled)
β”œβ”€β”€ public (static-root)
β”œβ”€β”€ blaze.config.js (from blazze-init)
β”œβ”€β”€ package.json
β”œβ”€β”€ packagelock.json
└── ...

2Project Structure

Blazze creates a root endpoint dir that you specified in the cli. You can add your API routes in it, each with its own respective files namely:
  • GETTo handle get requests
  • POSTTo handle post requests
  • PUTTo handle put requests
  • PATCHTo handle patch requests
  • DELETETo handle delete requests
1. For nested route like this "users/new/payments" create this
   "users@new@payments" route folder.

2. For dynamic routes create folder with "_" (underscore)
   at the beggining ex: "_users"

3Conventions

To have nested API routes use "@" symbol, and for dynamic routes use "_" underscore symbol.
import { Request, Response } from "express";

export default async function (req: Request,res: Response){

    // do something usefull here ...

    let query = req.query;
    let params = req.params;
}

4Start Building !

You need to export a default normal function from each file, this function recives express req & res objects from blazze.
⚠️ Exporting arrow functions can cause build errors.

By developer, for developer's

Blazze is an opensource project to make API dev a breeze, become a part of the hottest JS community πŸ”₯ wheather you are a begginar like me πŸ˜… or a JS chad 😎, and help me start my first opensource project.
Built with devotion by Axn. Source code on Github.

|