Skip to content

Commit

Permalink
Merge pull request #14 from gofynd/readme-final
Browse files Browse the repository at this point in the history
readme-final
  • Loading branch information
girishbharambe authored Aug 15, 2024
2 parents e8d6576 + 03e8a67 commit e923653
Showing 1 changed file with 40 additions and 22 deletions.
62 changes: 40 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# Build a Fynd Extension using Node.js + Vue.js(vue3)

# Build a Fynd Extension using Java + Vue.js
![Java](https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white)
![Spring](https://img.shields.io/badge/spring-%236DB33F.svg?style=for-the-badge&logo=spring&logoColor=white)
![Vue.js](https://img.shields.io/badge/vuejs-%2335495e.svg?style=for-the-badge&logo=vuedotjs&logoColor=%234FC08D)


## Getting Started
[coveralls-badge]: https://coveralls.io/repos/github/gofynd/example-extension-java-vue/badge.svg?branch=main&&kill_cache=1
[coveralls-url]: https://coveralls.io/github/gofynd/example-extension-java-vue?branch=main

This project outlines the development process for a Fynd extension that displays product listings for a company and its associated applications. By following this guide, you'll be able to set up the development environment, build the extension locally, and understand the testing procedures.

## Quick start
### Prerequisites
* You have fdk-cli installed globally [install](https://github.com/gofynd/fdk-cli)
* You have installed globally [Node 16.X.X](https://docs.npmjs.com/) or above version.
* You have fdk-cli installed [install](https://github.com/gofynd/fdk-cli)
* You have created a [partner account](https://partners.fynd.com).
* You have created a [development account](https://partners.fynd.com/help/docs/partners/testing-extension/development-acc#create-development-account) and [populated test data](https://partners.fynd.com/help/docs/partners/testing-extension/development-acc#populate-test-data) in it.

* List of mandatory Services to be downloaded on your System
* You have downloaded and installed following on your System

1. [Java 14](https://www.java.com/en/) or higher
2. [Maven](https://maven.apache.org/download.cgi)
2. [Maven](https://maven.apache.org/download.cgi)
3. [Redis](https://redis.io)
4. [NodeJS 16](https://docs.npmjs.com/) or higher


## Install Template Locally
Expand All @@ -35,24 +36,41 @@ fdk extension preview
```
This command will provide a partner’s panel URL where you can interact with your extension. For more information, please read this [guide](https://github.com/gofynd/fdk-cli?tab=readme-ov-file#extension-commands).

## Docker Instructions

To run the application using Docker in Production environment, follow these steps:
* Build the Docker image:
```shell
docker build -t my-java-vue-app .
```
* Run the Docker container
```
docker run -p 8080:8080 my-java-vue-app
```
### Tests
Use the Below Controller to Test the Application :

## Build for production
Build frontend.
* HealthController : Uses the Actuator Health points to check if all the resources are stable and active

Using yarn:
```shell
cd frontend && yarn run build
```
Using npm:
```shell
cd frontend && npm run build
```
http://localhost:8080/_healthz


## Database Configuration

### Tests
Use the Below Controller to Test the Application :
By default, this template uses an `SQLite` database to store session data. SQLite is sufficient for development purpose only, it may not be suitable for all production scenarios. The best database for your application depends on your data requirements and query patterns.

If your app requires a more robust database solution, you can easily extend the base storage class provided by the `fdk-extension-java` library to use a database of your choice for session data. Here are some databases that we support by default:

- SQLite
- Memory Storage
- Redis

Feel free to configure and run your preferred database on your server to meet your specific needs.

## Tech Stack
1. [fdk-client-java](https://github.com/gofynd/fdk-client-java): This library contains all the methods to call Fynd platform APIs.
2. [fdk-extension-java](https://github.com/gofynd/fdk-extension-java): This library streamlines the setup of authentication for accessing Fynd Platform APIs. It also simplifies the process of subscribing to webhooks for receiving real-time notifications.

* HealthController : Uses the Actuator Health points to check if all the resources are stable and active

http://localhost:8080/_heathz
[coveralls-badge]: https://coveralls.io/repos/github/gofynd/example-extension-javascript-react/badge.svg?branch=main&&kill_cache=1
[coveralls-url]: https://coveralls.io/github/gofynd/example-extension-javascript-react?branch=main

0 comments on commit e923653

Please sign in to comment.