Skip to content

Commit

Permalink
Readme updates (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
chavda-bhavik authored Nov 23, 2022
2 parents 41ec142 + 3e5e21d commit 47876e1
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 39 deletions.
49 changes: 12 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
</li>
<li><a href="#setup">Setup</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#roadmap">Roadmap</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#license">License</a></li>
<li><a href="#contact">Contact</a></li>
Expand Down Expand Up @@ -77,48 +76,24 @@ To set up `impler.io` locally, you need the following things installed in your c
Follow these steps to setup the project locally,
1. Clone the repo, `git clone https://github.com/knovator/impler.io`.
2. Install the dependencies, `pnpm install`.
3. Copy `.env.development` file from `apps/api/src` to `apps/api/src/.env` and do changes to variables if needed.
3. Do setups for projects by running, `pnpm setup:project`.
4. Start the application, `pnpm start:dev`.
5. Start interacting with API by visiting `http://localhost:3000/api`.

<!-- USAGE EXAMPLES -->
## Usage

`impler` need to be communicated through **REST API**, you can easily make call through **Swagger UI** provided at `http://localhost:3000/api`,
1. You create `project`.
2. You add `template` to `project`, Template refers to set of data you want to import i.e. users data.
3. Add `columns` to `template`, Column refers to individual fields template can have, for example users Template can have firstname, lastname, address, email, phonenumber, etc.
4. Upload `file` to `template`, After columns being set well, we're ready to import `.csv`, `.xls`, `.xlsx` file to aplication.
* `Upload` response returns data with `headings` specified in uploaded file.
* Keep note of uploaded file `id`, it will be used later.
* Uploaded file headings will be mapped automatically with `columns` provided for `template`.
5. Check `mapping` done for uploaded file, and finalize mappings.
6. Get `review` data for uploaded file and confirm reivew with option whether you want ot excempt invalid data or want to keep them.
5. Start interacting with API by visiting `http://localhost:3000/api` or see demo on `http://localhost:5173`.

<p align="right">(<a href="#readme-top">back to top</a>)</p>
### Add Import Schema

<!-- ROADMAP -->
## Roadmap

- [x] API
- [x] Project
- [x] Template
- [x] Column
- [x] Upload
- [x] Mapping
- [x] Review
- [x] Processing data
- [x] Web
- [x] Upload Phase
- [x] Mapping Phase
- [x] Review Phase
- [x] Confirm Phase
- [x] Infra
- [x] Docker
After doing setup, you can easily make call to the `impler` through **Swagger UI** provided at `http://localhost:3000/api`,
1. Create `project` by calling `/v1/project` API, and Copy `_id` from the response.
2. Create `template` by calling `/v1/template/{projectId}` API, and Copy `_id` from the response.
3. Update `columns` for template by calling `/v1/column/{templateId}` API.

<p align="right">(<a href="#readme-top">back to top</a>)</p>
### See Demo

If you're running `impler` locally, after [adding-schema](#add-import-schema) you can start interacting with import widget from `http://localhost:5173`.


<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- CONTRIBUTING -->
## Contributing

Expand Down
55 changes: 55 additions & 0 deletions docker/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

Docker is the easiest way to get started with self-hosted `Impler`.

## Before you begin

You need the following installed in your system:

- [Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/)
- [Git](https://git-scm.com/downloads)

## Quick Start

### Get the code

Clone the Impler repo and enter the docker directory locally:

```sh
# Get the code
git clone --depth 1 https://github.com/knovator/impler.io

# Go to the docker folder
cd impler.io/docker

# Copy the example env file
cp .env.example .env

# Start
docker-compose up
```

Now visit [http://localhost:3000/api](http://localhost:3000/api) to define the schema for your import.


## Secure your setup

While we provide you with some example secrets for getting started, you should NEVER deploy your Impler setup using the defaults provided.

### Update Secrets

Update the `.env` file with your own secrets. In particular, these are required:

- `ACCESS_KEY`: used by the API as a header to authenticate `API` requests.

## Configuration

To keep the setup simple, we made some choices that may not be optimal for production:

- the database is in the same machine as the servers
- the storage uses the S3 to store files

We strongly recommend that you decouple your database before deploying.

## Next steps

- Got a question? [Ask here](https://github.com/knovator/impler.io/discussions).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "impler.io",
"version": "0.1.0",
"version": "0.1.4",
"description": "Open source infrastructure to import data easily",
"packageManager": "[email protected]",
"private": true,
Expand Down
63 changes: 62 additions & 1 deletion packages/react/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,62 @@
<h1>impler</h1>
<div align="center">
<a href="https://impler.io">
<img src="https://user-images.githubusercontent.com/50201755/203472285-e64392b4-b01d-4ee9-95d8-9a41297fdfe2.png" width="280" alt="Logo"/>
</a>
</div>
<h1 align="center">Embed Data Import into your Product</h1>
<p align="center">
<br />
<a href="https://docs.impler.io"><strong>Explore the docs »</strong></a>
·
<a href="https://discord.impler.io">Join Discord</a>
·
<a href="https://github.com/knovator/impler.io/issues/new">Report Bug</a>
</p>

## ⭐️ Why
The ability to import data is often needed in the application. It usually starts the same, reading `.csv` or `.xlsx` file and insert records into the database. But after a while, you'll find yourself looping over large files, validating rows, and providing support for file types that you've never heard of them before.

Impler's goal is to help developers create an efficient and smooth data import experience between the product and its users. All with an easy-to-use API and outstanding developer experience.

## ✨ Features

- 🌈 Mapping Support between specified Schema and Fields in File
- 💅 Validation Support
- 🚀 Webhook support to send uploaded data
- 🛡 Simple and powerful Authentication
- 📦 Easy to set up and integrate
- 🛡 Written in TypeScript

## 📦 Install

```bash
npm install @impler/react
```

```bash
yarn add @impler/react
```

## 🔨 Usage

### Add Script
You copy this snippet to your code before the closing body tag.
```html
<script type="text/javascript" src="https://localhost:4701/embed.umd.min.js" async></script>
```

### Add Import Button

```tsx
import { Button as ImportButton } from '@impler/react';

<ImportButton
projectId="<PROJECT_ID>"
template="<CODE_OR_ID>" /* optional */
accessToken="<SECRET>" /* required if API is protected */
/>
```

## 🔗 Links

- [Home page](https://impler.io/)

0 comments on commit 47876e1

Please sign in to comment.