Validates apps-in-toss project configuration and structure for both web and React Native apps...
Validates apps-in-toss project configuration, structure, and policies for both web and React Native projects.
Supported Project Types:
@apps-in-toss/web-framework@apps-in-toss/granite with Metro bundler@apps-in-toss/web-framework)When validating an apps-in-toss project, follow these steps:
Check that the project has:
package.json existsgranite.config.ts existssrc/ directory exists (recommended)tsconfig.json exists (recommended for TypeScript projects)Check:
@apps-in-toss/framework, @apps-in-toss/web-framework, or @granite-js/react-native in dependencies or devDependencies@apps-in-toss/framework < 1.0.0: @toss-design-system/react-native@apps-in-toss/framework >= 1.0.0: @toss/tds-react-native@apps-in-toss/web-framework < 1.0.0: @toss-design-system/mobile@apps-in-toss/web-framework >= 1.0.0: @toss/tds-mobilename fieldversion fieldscripts field with common scripts (dev, build, etc.)Check against web-granite-config-schema.md:
Required checks:
defineConfig from @apps-in-toss/web-framework/configexport default defineConfig statementappName (string)brand (object with displayName, primaryColor, icon)permissions (array)web.port (number)web.commands.dev (string)web.commands.build (string)Optional recommended fields:
navigationBar (object)webViewProps (object)outdir (string)Check against react-native-granite-config-schema.md:
Required checks:
defineConfig from @granite-js/react-native/configappsInToss from @apps-in-toss/framework/pluginsexport default defineConfig statementscheme (string)appName (string)appsInToss plugin in plugins array with:brand (object with displayName, primaryColor, icon)permissions (array)Optional recommended fields:
navigationBar (object)entryFile (string)outdir (string)package.json to identify project type and framework versiongranite.config.ts to determine app type (game vs non-game)When reporting validation results to the user:
All required checks passed. The project configuration is valid.
Required configuration is missing or invalid. The project may not work correctly.
granite.config.ts:15)Non-critical issue detected. The project may work, but best practices recommend addressing these.
Issue: package.json doesn't have required framework packages
Solution for Web:
npm install @apps-in-toss/web-framework
Solution for React Native:
npm install @granite-js/react-native @apps-in-toss/framework
Issue: granite.config.ts is missing the appName field
Solution: Add appName to granite.config.ts:
export default defineConfig({
appName: 'my-app',
// ...
});
Issue: granite.config.ts is missing the brand configuration
Solution: Add complete brand object:
export default defineConfig({
brand: {
displayName: 'My App',
primaryColor: '#3182F6',
icon: 'https://static.toss.im/icons/app-icon.png',
},
// ...
});
Issue: granite.config.ts is missing the permissions array
Solution: Add permissions array (can be empty):
export default defineConfig({
permissions: [],
// or with specific permissions:
permissions: [
{ name: 'clipboard', access: 'read' },
{ name: 'camera', access: 'access' },
],
// ...
});
Issue: React Native project doesn't have appsInToss plugin
Solution: Add the plugin to the plugins array:
import { appsInToss } from '@apps-in-toss/framework/plugins';
export default defineConfig({
plugins: [
appsInToss({
brand: {
displayName: 'My App',
primaryColor: '#3182F6',
icon: 'https://static.toss.im/icons/app-icon.png',
},
permissions: [],
}),
],
});
Issue: Using wrong import path for defineConfig
Solution for Web:
import { defineConfig } from '@apps-in-toss/web-framework/config';
Solution for React Native:
import { defineConfig } from '@granite-js/react-native/config';
Issue: Project doesn't have a granite.config.ts file
Solution: Create the file using the appropriate template:
Issue: granite.config.ts doesn't export the configuration
Solution: Add export statement:
export default defineConfig({ /* config */ });
Issue: Mini-app doesn't have TDS package in package.json
Important: TDS is strongly recommended for consistent Toss UX and better review approval chances.
Solution for React Native:
Check framework version in package.json:
If @apps-in-toss/framework < 1.0.0:
npm install @toss-design-system/react-native
If @apps-in-toss/framework >= 1.0.0:
npm install @toss/tds-react-native
Solution for Web:
Check framework version in package.json:
If @apps-in-toss/web-framework < 1.0.0:
npm install @toss-design-system/mobile
If @apps-in-toss/web-framework >= 1.0.0:
npm install @toss/tds-mobile
TDS Documentation:
Note: Game apps (appType: 'game') may be exempt from TDS requirement
Always consult these references when validating:
granite.config.tsgranite.config.ts.ait packaging/monitoring.Validating apps-in-toss project...
ā
package.json found and valid
ā
granite.config.ts found
Project Type: Web (detected @apps-in-toss/web-framework v1.2.0)
App Type: general (non-game)
ā Critical Errors:
1. Missing required field: brand
Location: granite.config.ts
Fix: Add brand configuration with displayName, primaryColor, and icon
2. Missing required field: permissions
Location: granite.config.ts
Fix: Add permissions array (can be empty: permissions: [])
ā ļø Warnings:
1. Missing recommended field: navigationBar
Suggestion: Add navigationBar for better UX
2. TDS package not found
Recommendation: Install @toss/tds-mobile (for @apps-in-toss/web-framework >= 1.0.0)
Command: npm install @toss/tds-mobile
Benefit: Provides consistent Toss UX and improves review approval chances
Documentation: https://tossmini-docs.toss.im/tds-mobile
Consult: references/web-granite-config-schema.md for complete examples