1. Install the Napps CLI
Install the Napps CLI from npm:napps command available in your terminal.
2. Create a New Project
Use the Napps project template: Run:Product LayoutApp Extensions
Set Up Your Own Project
If you prefer to set up your own project instead of using the template, install the Expresso TypeScript types from@napps/component-extension:
3. Understand the Project Layout
The generated project contains the files you need to develop and build your Expresso code. An App Extensions project usually looks like this:index.ts: exports the functions that Expresso can load.src/extension.ts: contains your extension code.napps.config.json: describes your project, extensions, components, and identifiers.package.json: contains your dependencies and scripts.vite.config.ts: contains the build configuration.tsconfig.json: contains the TypeScript configuration.
src/extension.ts and export it from index.ts.
Example:
Product Layout template, the project is focused on creating components instead of app extension functions. The same idea still applies: write your code in the generated source files, export what the runtime needs from index.ts, and keep the project configuration in napps.config.json.
You can later add Product Layout or App Extension to the same project.
4. Start a Development Session
Run:- Choose
App Extensionsif you created an App Extensions project. - Choose
Product Layoutif you created a Product Layout project.
5. Install the Napps Mobile App
Install the Napps mobile app on your device. Android: https://play.google.com/store/apps/details?id=pt.napps.shop iOS: https://apps.apple.com/pt/app/napps/id15572224496. Connect the App to Your Dev Session
Open the Napps mobile app. Then open the dev menu in the app. From the dev menu, connect to your development session using one of these options:- Scan the QR code shown by
napps dev. - Enter the direct URL shown by
napps dev.