Dear Frappe Community,
As I was looking to have ERPNext inside a mobile app on Android or iOS, I finally found this quick and easy solution without the need to edit any source code or create a custom app. There’s no need for any static manifest file in the ERPNext or any other app source code, or even an additional settings page. This way, the admin has full flexibility to style and configure the app freely.
Requirements
- A logo for your app
- A
manifest.json
file for your app
How-To
- Upload a SVG logo as a public file on your instance and get the public URL of that logo.
- Create a
manifest.json
file in the following format (You may customize it):
{
"name": "ERPNext Mobile",
"short_name": "ERPNext",
"start_url": "/",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#000000",
"description": "Mobile APP PWA for ERPNext / Frappe",
"categories": [
"business",
"productivity",
"utilities"
],
"icons": [
{
"src": "/files/logo.svg", # Path of your uploaded Logo from step 1
"sizes": "48x48 72x72 96x96 128x128 256x256 512x512",
"type": "image/svg+xml",
"purpose": "any"
}
],
"id": "erpnext",
"dir": "auto",
"lang": "en",
"orientation": "any",
"prefer_related_applications": false,
"handle_links": "preferred",
"launch_handler": {
"client_mode": "navigate-existing"
},
"shortcuts": [
{
"name": "Todo",
"url": "/app/todo",
"description": "Todo List",
"icons": [
{
"src": "/files/logo.svg",
"type": "image/svg+xml",
"purpose": "any"
}
]
},
{
"name": "Tasks",
"url": "/app/task",
"description": "Tasks List",
"icons": [
{
"src": "/files/logo.svg",
"type": "image/svg+xml",
"purpose": "any"
}
]
}
]
}
- Upload your
manifest.json
file as a public file to your Frappe/ERPNext instance and copy its URL. - Go to
Website Settings
and head to theHeader, Robots
section. - Paste the following in your head section and ensure the URL of your
manifest.json
file is accessible on your instance, even when you are not logged in.
<!-- Link to the manifest file -->
<link rel="manifest" href="/files/manifest.json">
Now when you log out, you will have the install option on every major browser to install your Frappe/ERPNext site as a PWA.
Create a Real Mobile App from That
You have many choices to create a real installable app using the PWA as a base. The easiest way is to head over to PWA Builder, enter your Frappe URL, and then download the package for your platform to install.
Further Functionality Needed! Please help!
Does anyone have an idea to create a Service Worker to get notifications, even when the app is not in focus? That would be nice.
Tags: ERPNext, Frappe, PWA, Progressive Web App, Mobile App, Android, iOS, manifest.json