Skip to content

Commit

Permalink
docs: include a better, more fully explanatory README file (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend authored Oct 24, 2023
1 parent 9e1d11e commit 59e4877
Showing 1 changed file with 70 additions and 35 deletions.
105 changes: 70 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,105 @@
# BasicPay
# BasicPay <!-- omit in toc -->

> The app that lets you pay, _basically_, anyone.
An example payments application demonstrating integrations of various features
and SEPs in a user-facing product.
An example payments application demonstrating integrations of various Stellar
features and SEPs in a user-facing product.

> :warning: **CAUTION:** Although BasicPay is a full-fledged application on
> Stellar's Testnet, it has been built solely to showcase Stellar functionality
> for the educational purposes of this tutorial, not to be copied, pasted, and
> used on Mainnet.
The project is built using SvelteKit.
## Table of Contents <!-- omit in toc -->

## Where to Start?
- [Companion App](#companion-app)
- [Companion Tutorial](#companion-tutorial)
- [Development Instructions](#development-instructions)
- [Where to Start in this Repository?](#where-to-start-in-this-repository)
- [Stellar](#stellar)
- [SEPs](#seps)
- [Other Stellar Functionality](#other-stellar-functionality)
- [SvelteKit](#sveltekit)
- [Pages and Routes](#pages-and-routes)
- [Stores](#stores)

talk about where a dev might find a useful place to start exploring the codebase

## Building Instructions
## Companion App

`yarn dev` and so forth
This isn't just a codebase, it's a fully functioning testnet wallet! You can
check it out and use it here: <https://basicpay.pages.dev>

## Companion Tutorial

link to the tutorial in the documentation
This application was built to coincide with a written tutorial, located in the
Stellar documentation. This tutorial is a "nearly comprehensive" guide to
building the features in this app. Following along with the tutorial and this
source code repository, you can get a solid understanding of building an
application on the Stellar network.

## Companion App
Find the start the tutorial here:
<https://developers.stellar.org/docs/building-apps/example-application-tutorial/overview>

This isn't just a codebase, it's a fully functioning testnet wallet! Check it out here: <https://basicpay.pages.dev>
## Development Instructions

The default readme that was generated is preserved below:
Clone the repository:

## create-svelte
```bash
git clone https://github.com/stellar/basic-payment-app.git
```

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
Change into the repository app:

### Creating a project
```bash
cd basic-payment-app
```

If you're seeing this, you've probably already done this step. Congrats!
Install dependencies and start the development server.

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
yarn install
yarn dev
```

### Developing
You can now visit the local development site in your browser at
<http://localhost:5173>

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
## Where to Start in this Repository?

```bash
npm run dev
We've worked to document everything in this repo, so start exploring wherever
you like. We'd suggest looking into the following areas:

# or start the server and open the app in a new browser tab
npm run dev -- --open
```
### Stellar

### Building
The heart and soul of this application is interacting with the Stellar network.

To create a production version of your app:
#### SEPs

```bash
npm run build
```
Most of the Stellar interactions take place through the use of SEPs (Stellar
Ecosystem Proposals). These interactions are coded in the
`/src/lib/stellar/sep*.js` files.

#### Other Stellar Functionality

More generic Stellar functionality are located in the same directory:

- `/src/lib/stellar/horizonQueries.js` for querying information from the network
- `/src/lib/stellar/transactions.js` for building different kinds of Stelar
transactions

### SvelteKit

This application is built using SvelteKit. We don't want to make this much of a
"SvelteKit Tutorial," but here's what you may want to explore:

#### Pages and Routes

We primarily use SvelteKit for its routing capability. You can begin exploring
the SvelteKit components by reading the comments in the
`/src/routes/dashboard/+page.svelte` file.

You can preview the production build with `npm run preview`.
#### Stores

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
We also have implemented a few custom stores to keep track of contact names and
addresses, user KYC information, a list of anchor transfers, etc. A good place
to start exploring these stores is the `/src/lib/stores/contactsStore.js` file.

0 comments on commit 59e4877

Please sign in to comment.