├── resources
├── blogs
│ ├── .gitkeep
│ ├── Raspberry Pi Dashboard
│ │ ├── screenshot.jpg
│ │ └── README.md
│ └── Deadline Manager
│ │ └── README.md
├── videos
│ ├── slider-widgets
│ │ ├── readme.md
│ │ └── app.json
│ ├── csv-to-firestore
│ │ ├── readme.md
│ │ ├── app.json
│ │ └── users.csv
│ ├── readme.md
│ ├── codescanner-checkout-app
│ │ ├── readme.md
│ │ └── app.json
│ ├── appsmith-selfhosted-with-local-databases
│ │ ├── readme.md
│ │ ├── .env
│ │ ├── docker-compose.yml
│ │ └── todos.csv
│ ├── .DS_Store
│ ├── support-dashboard-hasuracon-2023
│ │ ├── .DS_Store
│ │ ├── deck
│ │ │ └── HasuraCon 2023.pdf
│ │ ├── readme.md
│ │ └── data
│ │ │ └── tickets.csv
│ ├── secure-db-login-with-rls
│ │ ├── users.csv
│ │ ├── readme.md
│ │ └── todos.csv
│ ├── dynamodb-admin-panel-livestream
│ │ ├── readme.md
│ │ └── products.csv
│ ├── todo-kanban-app-with-mongodb
│ │ ├── readme.md
│ │ └── todos.csv
│ └── self-host-on-k8s
│ │ └── readme.md
└── README.md
├── .gitignore
├── libraries
├── jsDocLite
│ ├── image.png
│ ├── README.md
│ ├── COMMENTING.md
│ └── index.js
└── svgTags
│ ├── image.png
│ ├── README.md
│ └── index.js
├── static
├── appsmith_logo_white.png
└── 952px-Noun_Project_content_icon_1762367.svg.png
├── package.json
├── .github
└── ISSUE_TEMPLATE
│ └── template-submission.md
├── LICENSE
├── tools
├── rollup.config.js
└── readme.generate.js
├── dist
├── jsDocLite.umd.js
└── svgTags.umd.js
└── README.md
/resources/blogs/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/node_modules
2 | **/.DS_Store
3 |
--------------------------------------------------------------------------------
/resources/videos/slider-widgets/readme.md:
--------------------------------------------------------------------------------
1 | slider-widgets
2 |
--------------------------------------------------------------------------------
/resources/videos/csv-to-firestore/readme.md:
--------------------------------------------------------------------------------
1 | csv-to-firestore
2 |
--------------------------------------------------------------------------------
/resources/videos/readme.md:
--------------------------------------------------------------------------------
1 | # Resources From Videos & Livestreams
2 |
--------------------------------------------------------------------------------
/resources/videos/codescanner-checkout-app/readme.md:
--------------------------------------------------------------------------------
1 | # codescanner-checkout-app
2 |
--------------------------------------------------------------------------------
/resources/videos/appsmith-selfhosted-with-local-databases/readme.md:
--------------------------------------------------------------------------------
1 | # Usage
2 |
3 |
--------------------------------------------------------------------------------
/resources/videos/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appsmithorg/foundry/HEAD/resources/videos/.DS_Store
--------------------------------------------------------------------------------
/resources/videos/appsmith-selfhosted-with-local-databases/.env:
--------------------------------------------------------------------------------
1 | USERNAME=admin
2 | PASSWORD=1234567890
3 |
--------------------------------------------------------------------------------
/libraries/jsDocLite/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appsmithorg/foundry/HEAD/libraries/jsDocLite/image.png
--------------------------------------------------------------------------------
/libraries/svgTags/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appsmithorg/foundry/HEAD/libraries/svgTags/image.png
--------------------------------------------------------------------------------
/static/appsmith_logo_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appsmithorg/foundry/HEAD/static/appsmith_logo_white.png
--------------------------------------------------------------------------------
/resources/blogs/Raspberry Pi Dashboard/screenshot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appsmithorg/foundry/HEAD/resources/blogs/Raspberry Pi Dashboard/screenshot.jpg
--------------------------------------------------------------------------------
/static/952px-Noun_Project_content_icon_1762367.svg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appsmithorg/foundry/HEAD/static/952px-Noun_Project_content_icon_1762367.svg.png
--------------------------------------------------------------------------------
/resources/videos/support-dashboard-hasuracon-2023/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appsmithorg/foundry/HEAD/resources/videos/support-dashboard-hasuracon-2023/.DS_Store
--------------------------------------------------------------------------------
/resources/videos/support-dashboard-hasuracon-2023/deck/HasuraCon 2023.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appsmithorg/foundry/HEAD/resources/videos/support-dashboard-hasuracon-2023/deck/HasuraCon 2023.pdf
--------------------------------------------------------------------------------
/resources/videos/secure-db-login-with-rls/users.csv:
--------------------------------------------------------------------------------
1 | email,password
2 | confidence@appsmith.com,$2a$10$nHUKPyr4nbKRgwAVQtDoB.hJpws74.UJnkVRVCbGddCAmKJKS1iR2
3 | vihar@appsmith.com,$2a$10$WHwI6if6d4Y1PBPVOqbc3.xujyzApoXE9vaf9tB4AGF2Wm9pyGcaW
--------------------------------------------------------------------------------
/resources/videos/dynamodb-admin-panel-livestream/readme.md:
--------------------------------------------------------------------------------
1 | # dynamodb-admin-panel-livestream
2 |
3 | - Livestream [https://youtu.be/FQjTgnngTgA](https://youtu.be/FQjTgnngTgA)
4 | - App JSON [app.json](./app.json)
5 | - Dummy data [products.csv](./products.csv)
6 |
--------------------------------------------------------------------------------
/resources/blogs/Deadline Manager/README.md:
--------------------------------------------------------------------------------
1 | # Building a deadline manager with Firestore and Appsmith
2 |
3 | 
4 |
5 | To build this Deadline Manager using Firestore and Appsmith, check out the blog [here]()
6 |
--------------------------------------------------------------------------------
/resources/README.md:
--------------------------------------------------------------------------------
1 | # Deprecated directory
2 |
3 | This folder is from the previous incarnation of this repo, and some of these resources are linked from content. We need to migrate these to portal posts and community templates, and then we can remove it.
4 |
5 | For the purposes of this repo as a JS library toolset, this diredctory can be ignored.
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "devDependencies": {
3 | "@rollup/plugin-node-resolve": "^15.2.3",
4 | "@rollup/plugin-terser": "^0.4.4",
5 | "rollup": "^2.79.1"
6 | },
7 | "scripts": {
8 | "umd.generate": "rollup --config tools/rollup.config.js",
9 | "readme.generate": "node tools/readme.generate.js",
10 | "build": "npm run umd.generate && npm run readme.generate"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/resources/blogs/Raspberry Pi Dashboard/README.md:
--------------------------------------------------------------------------------
1 | # Build a Raspberry Pi monitoring dashboard in under 30 minutes
2 |
3 | 
4 |
5 | > The dashboard shows CPU, disk, and memory stats without additional hardware and 17/10 dev skills.
6 |
7 | This app export goes along with a tutorial that walks you through building an on-demand Raspberry Pi monitoring dashboard fast to see CPU, memory, and disk stats in real-time and add more views + actions over time just as easily.
8 |
9 |
--------------------------------------------------------------------------------
/resources/videos/support-dashboard-hasuracon-2023/readme.md:
--------------------------------------------------------------------------------
1 | # support dashboard
2 |
3 | Link to presentation:
4 | [https://app.pitch.com/app/presentation/bb3ca642-ba48-4ccc-a88c-34931e28dab0/311d4c0f-cbc5-436b-89f2-732b008dee6d](https://app.pitch.com/app/presentation/bb3ca642-ba48-4ccc-a88c-34931e28dab0/311d4c0f-cbc5-436b-89f2-732b008dee6d)
5 |
6 | Link to live demo:
7 | [https://app.appsmith.com/app/support-dashboard/home-6483b3915262b67a983112b6](https://app.appsmith.com/app/support-dashboard/home-6483b3915262b67a983112b6)
8 |
9 | Link to GraphQL API:
10 | [https://support-tickets-hscn.hasura.app/v1/graphql](https://support-tickets-hscn.hasura.app/v1/graphql)
11 |
--------------------------------------------------------------------------------
/resources/videos/todo-kanban-app-with-mongodb/readme.md:
--------------------------------------------------------------------------------
1 | # Todo Kanban App With MongoDB
2 | This app was built with Appsmith and MongoDB, and was built live in [How To Build A Kanban Board Todo App With MongoDB
3 | ](https://youtu.be/xr0s4fWq86w) livestream.
4 |
5 |
6 | The app can be directly imported using the app's JSON file [Todo Kanban App With MongoDB.json](./Todo%20Kanban%20App%20With%20MongoDB.json)
7 |
8 | > Follow this guide to [learn how to import apps from JSON files](https://docs.appsmith.com/advanced-concepts/more/backup-restore#import-from-an-application-json-file)
9 |
10 | You can also import the CSV file [todos.csv](./todos.csv) into your database for easy setup.
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/template-submission.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Template submission
3 | about: Add your template to the community listing.
4 | title: "[TEMPLATE] Title goes here"
5 | labels: community contrib
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Description
11 | A clear and concise description of what the template is and the use case it is intended to solve for.
12 |
13 | ### Integrations and features
14 | A list of specific integrations, data sources, and specific features
15 | - some DB
16 | - an API
17 | - table with update modal
18 |
19 | #### Attachments
20 | - [ ] **Link to app** - Link to the _public_ app
21 | - [ ] **Screenshots** - Add one or more screenshots to help show your app.
22 | - [ ] **JSON Export** - Attach the [JSON export](https://docs.appsmith.com/advanced-concepts/more/backup-restore#export-application) for your app to the issue.
23 |
--------------------------------------------------------------------------------
/resources/videos/secure-db-login-with-rls/readme.md:
--------------------------------------------------------------------------------
1 | # secure-db-login-with-rls
2 |
3 | Video link [https://youtu.be/8qPTZQvJ9fA](https://youtu.be/8qPTZQvJ9fA)
4 |
5 | ## SQL commands
6 |
7 | Enable RLS
8 |
9 | ```sql
10 | ALTER TABLE todos ENABLE ROW LEVEL SECURITY;
11 | ```
12 |
13 | Create an access policy
14 |
15 | ```sql
16 | DROP POLICY IF EXISTS "Enable all actions for user based on ID" ON todos;
17 |
18 | CREATE POLICY "Enable all actions for user based on ID" ON todos
19 | USING (todos.user = current_setting('app.app_user'));
20 | ```
21 |
22 | Create an RLS app user
23 |
24 | ```sql
25 | CREATE USER appsmith WITH PASSWORD 'appsmith';
26 |
27 | GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO appsmith;
28 |
29 | GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO appsmith;
30 | ```
31 |
32 | Set user session
33 |
34 | ```sql
35 | SET app.app_user TO 'confidence@appsmith.com';
36 | ```
37 |
38 | Get user session
39 |
40 | ```
41 | SELECT current_setting('app.app_user');
42 | ```
43 |
--------------------------------------------------------------------------------
/resources/videos/appsmith-selfhosted-with-local-databases/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: "3"
2 |
3 | services:
4 | appsmith:
5 | image: index.docker.io/appsmith/appsmith-ce
6 | container_name: appsmith
7 | ports:
8 | - 8080:80
9 | volumes:
10 | - ./stacks:/appsmith-stacks
11 | restart: unless-stopped
12 | labels:
13 | com.centurylinklabs.watchtower.enable: true
14 | depends_on:
15 | - mongo
16 | - postgres
17 | mongo:
18 | image: mongo:latest
19 | restart: unless-stopped
20 | environment:
21 | - MONGO_INITDB_ROOT_USERNAME=$USERNAME
22 | - MONGO_INITDB_ROOT_PASSWORD=$PASSWORD
23 | ports:
24 | - 27017:27017
25 | volumes:
26 | - ./mongo-data:/data/db
27 | env_file:
28 | - .env
29 | postgres:
30 | image: postgres:latest
31 | restart: unless-stopped
32 | environment:
33 | - POSTGRES_USER=$USERNAME
34 | - POSTGRES_PASSWORD=$PASSWORD
35 | ports:
36 | - 5432:5432
37 | volumes:
38 | - ./postgres-data:/var/lib/postgresql/data
39 | env_file:
40 | - .env
41 |
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Appsmith
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/tools/rollup.config.js:
--------------------------------------------------------------------------------
1 | import resolve from '@rollup/plugin-node-resolve';
2 | import terser from '@rollup/plugin-terser';
3 | import path from 'path';
4 | import fs from 'fs';
5 |
6 | // Adjust the base directory to the project root
7 | const baseDir = path.resolve(__dirname, '..');
8 |
9 | // Dynamically generate the Rollup configuration for each library
10 | const libraryFolders = fs.readdirSync(path.join(baseDir, 'libraries')).filter(file => {
11 | return fs.statSync(path.join(baseDir, 'libraries', file)).isDirectory();
12 | });
13 |
14 | const outputConfig = libraryFolders.map(folder => {
15 | return {
16 | input: path.join(baseDir, `libraries/${folder}/index.js`),
17 | output: {
18 | file: path.join(baseDir, `dist/${folder}.umd.js`),
19 | format: 'umd',
20 | name: folder.replace(/-\w/g, m => m[1].toUpperCase()), // Convert kebab-case to CamelCase
21 | globals: {
22 | // Define globals here if your libraries depend on external modules
23 | }
24 | },
25 | plugins: [
26 | resolve(),
27 | terser(),
28 | ],
29 | external: [
30 | // Add external dependencies here if needed
31 | ]
32 | };
33 | });
34 |
35 | export default outputConfig;
36 |
--------------------------------------------------------------------------------
/resources/videos/self-host-on-k8s/readme.md:
--------------------------------------------------------------------------------
1 | # How To Self-host Appsmith On Kubernetes
2 |
3 | Video Link [https://youtu.be/wZzYL1uZwds](https://youtu.be/wZzYL1uZwds)
4 |
5 | Install k3s
6 |
7 | ```sh
8 | curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
9 | ```
10 |
11 | Install Helm
12 |
13 | ```sh
14 | curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
15 | ```
16 |
17 | Download Appsmith config values
18 |
19 | ```sh
20 | curl -L https://bit.ly/3ETEgPT -o "$PWD/values.yml"
21 | ```
22 |
23 | Add the Appsmith registry
24 |
25 | ```sh
26 | helm repo add appsmith https://helm.appsmith.com
27 | ```
28 |
29 | Update local repository
30 |
31 | ```sh
32 | helm repo update
33 | ```
34 |
35 | Create an Appsmith namespace
36 |
37 | ```sh
38 | kubectl create namespace myappsmith
39 | ```
40 |
41 | Add the `kUBECONFIG` variable
42 |
43 | ```sh
44 | echo "export KUBECONFIG=/etc/rancher/k3s/k3s.yaml" >> ~/.bashrc
45 | source ~/.bashrc
46 | ```
47 |
48 | Install Appsmith
49 |
50 | ```sh
51 | helm install appsmith appsmith/appsmith --namespace myappsmith
52 | ```
53 |
54 | Create a NodePort service to expose the cluster
55 |
56 | ```sh
57 | kubectl expose pod appsmith-0 --name=appsmith-srv --port=80 --type=NodePort -n myappsmith
58 | kubectl describe service appsmith-srv -n myappsmith | grep NodePort:
59 | ```
60 |
--------------------------------------------------------------------------------
/dist/jsDocLite.umd.js:
--------------------------------------------------------------------------------
1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).jsDocLite=t()}(this,(function(){"use strict";return{entryRegex:{function:/@(function|func|method)\s+([a-zA-Z_$][0-9a-zA-Z_$]*)/gm,constant:/@(const|constant|property)\s+{(\w+)}\s+([a-zA-Z_$][0-9a-zA-Z_$]*)/gm,module:/@(module|class)\s+([a-zA-Z_$][0-9a-zA-Z_$]*)/gm},tagRegex:{params:/@(param|arg|argument)\s+{([\s\S]*?)}\s+([a-zA-Z_$][0-9a-zA-Z_$]*)\s*-([\s\S]*?)(?=@|$)/g,returns:/@returns\s+{([\s\S]*?)}\s+([\s\S]*?)(?=@|$)/g,async:/@async/g,example:/@example\s+([\s\S]*?)(?=@|$)/g,see:/@(see|link|doc)\s+([\s\S]*?)(?=@|$)/g},jsdocRegex:/\/\*\*([\s\S]*?)\*\//g,async parseFromUrl(e){const t=await this.fetchJsContent(e);return this.parse(t)},parse(e){const t=e.match(this.jsdocRegex)||[],s={modules:{},constants:{},functions:{}};return t.forEach((e=>{const t=this.cleanCommentBlock(e),n=this.parseComment(t);n&&n.entryName&&(s[n.entryType+"s"][n.entryName]=n)})),s},parseComment(e){let t=null,s=null,n=null;const a=e.match(/^(.+?)(?=@|$)/s),r=a?a[0].trim():null;if(Object.entries(this.entryRegex).forEach((([a,r])=>{r.lastIndex=0;const c=r.exec(e);if(c)switch(s=a,a){case"constant":n=c[2],t=c[3];break;case"module":t=c[1];break;default:t=c[2]}})),!t)return null;const c={entryType:s,entryName:t,description:r,...n?{dataType:n}:{}};for(const[t,s]of Object.entries(this.tagRegex)){const n=[...e.matchAll(s)];if(n.length)switch(t){case"params":c[t]=n.map((e=>({type:e[2]?.trim(),name:e[3]?.trim(),description:e[4]?.trim()})));break;case"returns":c[t]=n.map((e=>({type:e[1]?.trim(),description:e[2]?.trim()})));break;case"async":c[t]=!0;break;case"link":c[t]=n[0][1].trim();break;default:c[t]=n.map((e=>e[1]?.trim()))}}return c},cleanCommentBlock:e=>e=(e=e.replace(/\/\*\*|\*\//g,"").trim()).replace(/^\s*\*+/gm,"").trim(),async fetchJsContent(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch JS content from ${e}`);return t.text()}}}));
2 |
--------------------------------------------------------------------------------
/dist/svgTags.umd.js:
--------------------------------------------------------------------------------
1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).svgTags=t()}(this,(function(){"use strict";return{stringToNum(e="@#$%^&*",t=46){if(t<=0)throw new Error("modSize must be greater than 0");return[...e].reduce(((e,n)=>(e+n.charCodeAt(0))%t),0)},colors:["#DA0862","#E3005D","#E90047","#EC0A28","#EB1700","#EA2500","#E63100","#DF3D00","#D35100","#CB5E00","#BF6D00","#B07000","#A17A00","#8F8000","#777700","#659400","#4E9B00","#1E9F00","#00A000","#00A21A","#00A43B","#00A653","#00A869","#00A87F","#00A693","#00A2A7","#00A0B3","#009FBD","#009AC9","#0094D4","#008CF0","#0084FF","#007CFF","#0072FF","#2D6BFF","#4E63FF","#625BFF","#724FFF","#7F49F8","#8E43E3","#9D3DD8","#AA36CA","#B52FB8","#C126A7","#CA1D94","#D31580"],listToTags(e="Testing, one, two, three"){return`\n
\n ${e.split(",").map((e=>e.trim())).map((e=>{const t=this.stringToNum(e),n=this.colors[t];return`\n `})).join("")}\n
\n `},nameToInitialsSVG(e="Test User "){const t=this.colors[this.stringToNum(e)],n=`${t}33`,o=e.split(" ").map((e=>e.charAt(0).toUpperCase())).join(""),s=`\n \n `;return`data:image/svg+xml;base64,${btoa(s)}`},selectOptions:(e=getUsers.data.results,t="name.first",n="login.username")=>_.orderBy(_.uniqBy(e.map((e=>({label:_.get(e,t),value:_.get(e,n)}))).filter((e=>!!e.label&&!!e.value)),(e=>e.label)),"label"),objToRows:(e="123")=>e&&"object"==typeof e?Object.entries(e).map((([e,t])=>({prop:e,value:t}))):[]}}));
2 |
--------------------------------------------------------------------------------
/libraries/jsDocLite/README.md:
--------------------------------------------------------------------------------
1 | # jsDocLite
2 |
3 | 
4 |
5 | This module provides functionality to parse JSDoc comments from JavaScript code.
6 |
7 | ## Usage
8 |
9 | You can use the JSDelivr CDN to import this custom library into Appsmith.
10 | ```sh
11 | https://cdn.jsdelivr.net/gh/appsmithorg/foundry@main/dist/jsDocLite.umd.js
12 | ```
13 |
14 | ## Methods
15 |
16 | - [parseFromUrl](#jsdocliteparsefromurlurl)
17 | - [parse](#jsdocliteparsecode)
18 | - [parseComment](#jsdocliteparsecommentcomment)
19 | - [cleanCommentBlock](#jsdoclitecleancommentblockcommentblock)
20 | - [fetchJsContent](#jsdoclitefetchjscontenturl)
21 | -----
22 | ### jsDocLite.parseFromUrl(url)
23 |
24 | Asynchronously fetches JavaScript content from a URL and parses the JSDoc comments.
25 |
26 | - *parameters*
27 | - `url`: The URL to fetch the JavaScript content from.
28 |
29 | - *returns*
30 |
31 | - `Promise