The Svelte application is designed to allow users to upload their Amazon purchase history and select specific orders. After selecting, the app converts them into Verifiable Credentials(VCs) using the user's DIDs.
-
Clone the repository:
git clone https://github.com/tuum-tech/intori.com
-
Navigate to the project directory:
cd intori.com
-
Install the dependencies:
yarn install
-
Run the application:
yarn dev
-
Open your browser and navigate to
http://localhost:5173
.
-
App.svelte: The main application component. It handles routing and displays either the login component or the main app components based on the user's authentication status.
-
AuthenticatedRoute.svelte: A wrapper component that ensures routes are only accessible to authenticated users.
-
UserProfile.svelte: Displays the user's profile information, including their wallet address and DID.
-
Login.svelte: Allows users to log in using their email.
-
FileUpload.svelte: Lets users upload their Amazon purchase history in CSV format.
-
SelectOrders.svelte: Displays the uploaded orders and allows users to select specific orders.
-
FilteredOrders.svelte: Shows the selected orders along with their associated VC metadata.
-
auth.ts: Contains authentication functions using the Magic SDK.
-
authStore.ts: A Svelte store that keeps track of the user's authentication status.
-
stores.ts: Contains Svelte stores for orders and selected orders. It also manages the Veramo state.
- Users are first prompted to log in using their email.
- Once authenticated, users can upload their Amazon purchase history in CSV format.
- The uploaded orders are displayed, and users can select specific orders.
- The selected orders can be viewed in the
FilteredOrders
component, where each order's associated VC metadata is also displayed.