• Stars
    star
    163
  • Rank 231,141 (Top 5 %)
  • Language
    JavaScript
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐ŸŽƒ ๅŸบไบŽ fre ็š„ๅฐ็จ‹ๅบๆžถๆž„

smallapp

smallapp is a Chinese miniapp architecture implementation.

As of now, there are over 7 million miniapps in China, Chinese people do not like to use browsers or search engines.

Musk envied WeChat and he really wanted this miniapp architecture, so I opened it up.

Docs

smallapp follows WeChat's miniapp standard, you should refer to WeChat's documentation.

WeChat miniapp docs

Syntax

<view>
    <text>{{count}}</text>
    <button bindtap="add">+</button>
</view>
Page({
    data: {
        count: 0
    },
    add: () {
        this.setData({
            count: this.data.count + 1
        })

        wx.showToast({ 
            title: 'count is added!' 
        })
    }
})

Demos

https://v.douyin.com/Ug9bwvq/

Principle

  1. compiler
smallapp build -e app.json -o /dist

This step will package the miniapp project into js files, which is double threaded. The jsx file is used for rendering threads, and the js file is used for logical threads.

  1. worker

The logical thread is responsible for running JavaScript logic, and you need to find a JavaScript runtime, such as worker.

  • Web worker
  • Cloudflare worker
  • quickjs/v8/hermes

As long as it has the standard API and communication mechanism of the worker, it can serve as the logical layer of the miniapp.

  1. Native container

Miniapps runs on a super app, such as Wechat/Alipay/Baidu and its API is provided by the native container.

More Repositories

1

asta

๐Ÿ™ Resumable SSR framework.
JavaScript
694
star
2

eplayer

๐Ÿ”ฎ A web-component html5 video player facing future
JavaScript
269
star
3

labor

Simple implementation of Web Container
Go
188
star
4

fard2

๐ŸŽ… fre ่ฝฌๅฐ็จ‹ๅบ็š„ๆ–ฐๆ€่ทฏ โ™‚ learn once, write anywhere.
JavaScript
114
star
5

homo

Lightweight Rendering engine similar to Harmony, but use Fre and quickjs
C
59
star
6

deku

โ›„๏ธ No-bundle Dev Server for ES modules with deno.
JavaScript
51
star
7

joke

๐ŸŽƒ Tiny Javascript engine, does not support Typescript (yet).
Rust
45
star
8

peacecss

Golang implement of postcss.
Go
43
star
9

soga

Tiny layout engine.
Rust
40
star
10

wxml

wxml parser rust implement
Rust
39
star
11

oplayer

๐Ÿ‘พ react native video player for expo
JavaScript
25
star
12

node_swc

swc node binding use wasm
Rust
23
star
13

venti

Simple Vue SSR framework
JavaScript
21
star
14

loki-admin

Admin app build by KokiUI
JavaScript
14
star
15

fremix

Remix for fre
JavaScript
13
star
16

gei

๐Ÿ‘พ Fast 1kb sprites system with webgl.
JavaScript
13
star
17

tinyMDE

1kb markdown ็ผ–่พ‘ๅ™จ
JavaScript
12
star
18

picopack

๐Ÿ“ฆ Simple Typescript library bundler.
TypeScript
11
star
19

dirty-check

reactivity system with dirty checking
JavaScript
10
star
20

bad-scroll

100 lines scroll for mobile UI
JavaScript
8
star
21

m3u8.js

๐ŸŒ€ m3u8 client using WebAssembly and Media Source Extension
JavaScript
8
star
22

frekit

Streaming rendering for fre SSR
6
star
23

smox-counter

A redux-like state management which based on New context api
JavaScript
5
star
24

color-picker

Auto pick the primary color.
JavaScript
5
star
25

uraban-typecho-themes

typecho themes
PHP
4
star
26

fplayer

flutter player for clicli.tv
4
star
27

bale

Zero configuration builder.
4
star
28

voe2

Concurrent rendering engine.
JavaScript
4
star
29

TinyScript

Tiny javascript engine writted by rust.
4
star
30

gan

๐Ÿ‘พ A web framework packaged Go native which use fasthttp and httprouter
Go
3
star
31

vue-ssr

A vue-ssr demo
JavaScript
3
star
32

js-parser

Coarse-grained JavaScript block parser.
3
star
33

hello_wasm

hello wasm
JavaScript
3
star
34

remix-client

JavaScript
3
star
35

voe-ide

A ide for mini programs
3
star
36

kiana

the moe plugin of kiana
JavaScript
2
star
37

fre-sortable-tree

2
star
38

1990

2
star
39

opration-task-queue

JavaScript
2
star
40

rexpr

JavaScript expression parser
2
star
41

juvenile

Simple CICD
Go
2
star
42

fre3

fre3 ไธดๆ—ถไป“ๅบ“
Rust
2
star
43

moe-comment

1kb severless comment system
2
star
44

varix

Remix for vue
2
star
45

immix

Create next immutable patch by mutating the current.
JavaScript
2
star
46

yisar

2
star
47

cplayer

Simple video player UI for clicli app.
2
star
48

browser-cjs

JavaScript
2
star
49

esbuild-module-federation

2
star
50

requestIdlePromise

A POC for requestIdleCallback used Promise
JavaScript
2
star
51

fre-jotal

2
star
52

easy-crypto

Easy crpto use WebAssembly
JavaScript
2
star
53

ukagaka

this is a ukagaka plugin
JavaScript
2
star
54

blockchain-cli

cli for blockchain
JavaScript
2
star
55

tiga

Faster taro alternative.
Go
2
star
56

acgzone-moblie

acgzone mobile app written by react native
2
star
57

smox-todo

todolist for react and smox
2
star
58

fre-server-component

1
star
59

xiuno

Xino is a lightweight PHP forum system.
1
star
60

fre-counter

A demo for Fre
TypeScript
1
star
61

super-element

JSX alternative with swiftUI like syntax.
1
star
62

webpack-vemix--manifest

1
star
63

typeditor

๐Ÿก A markdown editor rewriting of typecho's
TypeScript
1
star
64

webview_video_player

Flutter video player with webview plugin.
1
star
65

jio

sm app build by react-native
1
star
66

fre-realword

A real world APP for Fre
1
star
67

UIwidgets

this is a simple slider
JavaScript
1
star
68

wean-demo-tuchong

A wean demo for tuchong.com
JavaScript
1
star
69

hvec

A simple javascript hvec_H265 muxer.
1
star
70

demon

A javascript framework for deno
1
star
71

danmu

danmuku for clicli
JavaScript
1
star
72

priority-scheduler

React scheduler implement.
1
star
73

snel

Html-first framework
JavaScript
1
star
74

js-basic-skill

js-basic-skill
1
star
75

gap

A simple and lightweight REST server framework.
1
star
76

duex

Another state manager make Redux use Vuex-like syntax
1
star
77

phpbb1

phpbb1 for php8
PHP
1
star