Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add frontend app as submodule #10

Merged
merged 48 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b65ce99
ID:FPCO-39972; Remove app folder and Add gitmodules file
ManishPrajapati-GoFynd Aug 6, 2024
067f0c9
ID:FPCO-39972; Added Submodules
ManishPrajapati-GoFynd Aug 6, 2024
1319406
ID:FPCO-39972; Update Submodules naming
ManishPrajapati-GoFynd Aug 6, 2024
f15e32c
ID:FPCO-39972; Remove v1.0 from API routes
ManishPrajapati-GoFynd Aug 6, 2024
4427ff4
ID:FPCO-39972; Update readme based on usecase
ManishPrajapati-GoFynd Aug 6, 2024
6a3948c
Update README.md
vivek-gofynd Aug 6, 2024
cbf6282
Update README.md
vivek-gofynd Aug 6, 2024
44282c7
Update README.md
vivek-gofynd Aug 6, 2024
bd3fa56
ID:FPCO-39972; Update latest commit of frontend
ManishPrajapati-GoFynd Aug 6, 2024
3531264
Merge branch 'update-sub-module' of github.com:gofynd/example-extensi…
ManishPrajapati-GoFynd Aug 6, 2024
7b99fee
ID:FPCO-39972; Remove extra space in preview command
ManishPrajapati-GoFynd Aug 6, 2024
a1911db
Add ext config files
ManishPrajapati-GoFynd Aug 7, 2024
508694c
Add env variable support for ext variables
ManishPrajapati-GoFynd Aug 7, 2024
aa6b201
remove cluster variable
ManishPrajapati-GoFynd Aug 7, 2024
380bea5
update fynd extension java version to 0.6.4
ManishPrajapati-GoFynd Aug 7, 2024
f7aa650
update sdk version
ManishPrajapati-GoFynd Aug 7, 2024
bfcd6e1
update readme
ManishPrajapati-GoFynd Aug 7, 2024
b7fc853
Update readme for updated init command
ManishPrajapati-GoFynd Aug 8, 2024
4144c68
Merge branch 'main' of github.com:gofynd/example-extension-java-vue i…
ManishPrajapati-GoFynd Aug 12, 2024
ddaaded
github workflow
girishbharambe Aug 13, 2024
07dd476
github workflow
girishbharambe Aug 13, 2024
949516e
github workflow
girishbharambe Aug 13, 2024
6a40444
github workflow
girishbharambe Aug 13, 2024
940a46e
github workflow
girishbharambe Aug 13, 2024
d51d84d
github workflow
girishbharambe Aug 13, 2024
a4a61d6
github workflow
girishbharambe Aug 13, 2024
0a89d00
github workflow
girishbharambe Aug 13, 2024
a552a33
github workflow
girishbharambe Aug 13, 2024
36bf877
github workflow
girishbharambe Aug 13, 2024
74ac4bc
github workflow
girishbharambe Aug 13, 2024
8aea336
github workflow
girishbharambe Aug 13, 2024
ff82a3f
github workflow
girishbharambe Aug 13, 2024
cb12b86
Merge pull request #13 from gofynd/github-workflow
vivek-gofynd Aug 13, 2024
74cab27
submodule updated
Aug 15, 2024
c5d6b04
submodule updated
Aug 15, 2024
ba1bb8b
sqlite support
girishbharambe Aug 15, 2024
e8d6576
sqlite support
girishbharambe Aug 15, 2024
03e8a67
final readme
girishbharambe Aug 15, 2024
e923653
Merge pull request #14 from gofynd/readme-final
girishbharambe Aug 15, 2024
27ae394
Update README.md
girishbharambe Aug 15, 2024
ff68c6b
added debug log
girishbharambe Aug 16, 2024
a24ca8c
test cases
girishbharambe Aug 16, 2024
942902f
Update README.md
girishbharambe Aug 16, 2024
28f4ce1
remove health endpoint
girishbharambe Aug 16, 2024
25aedd7
Merge remote-tracking branch 'origin/update-sub-module' into update-s…
girishbharambe Aug 16, 2024
5bdbc67
Update README.md
vivek-gofynd Aug 20, 2024
5ed39de
Update README.md
girishbharambe Aug 20, 2024
b888d33
fpco-40778
girishbharambe Aug 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/call_test_cases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run tests and coverage

on: [push, pull_request]

jobs:
run-test-cases:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest,]
java-version: [17]

steps:
- name: Get branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: get_branch

- uses: actions/checkout@v2

- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Run Maven tests and upload coverage
run: mvn clean test -Pclover

- name: Coveralls (Uploading test report)
if: ${{ github.ref == 'refs/heads/main' }}
uses: coverallsapp/github-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "frontend"]
path = frontend
url = https://github.com/gofynd/example-extension-vue
91 changes: 52 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,71 @@
# Sample Java-Vue Extension

# 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)

### Built With
[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

* [Spring Boot Framework](https://spring.io/projects/spring-boot)
* [Java 11](https://www.java.com/en/)
* [Redis](https://redis.io/)
* NodeJS 14 or higher


## Getting Started

This is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple steps :
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
List of mandatory Services to be downloaded on your System
* 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.
* 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)

1. Java 14 or higher
2. Maven
2. Redis

### Steps to Execute
## Install Template Locally
To initialize your extension template locally, run the following command:
```shell
fdk extension init --template java-vue
```
Enter your preferred extension name and type, and you are all set.

* Clone the project : [Git link](https://github.com/gofynd/example-extension-java-vue)
* Open the Spring boot project on any IDE
* Build Front-end dist files
```
cd app
npm i
npm run build
```
* Run the application
```
mvn clean install
mvn spring-boot:run
```
* Server starts on *8080*
## Local Development
To start local development, execute the following command:
```shell
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
## Docker Instructions

To run the application using Docker, follow these steps:
To run the application using Docker in Production environment, follow these steps:
* Build the Docker image:
```shell
docker build -t my-java-react-app .
docker build -t my-java-vue-app .
```
* Run the Docker container
```
docker run -p 8080:8080 -e SPRING_PROFILES_ACTIVE=dev my-java-react-app
docker run -p 8080:8080 my-java-vue-app
```
To Run the extension with Docker locally, ensure you first prepare your environment:

Fill in all the required values in the ``application-prod.yml`` file.
After setting up your .yml file, you can proceed with the Docker commands listed above to build and run your extension locally.

## Database Configuration

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.

### Tests
Use the Below Controller to Test the Application :
## 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
5 changes: 0 additions & 5 deletions app/babel.config.js

This file was deleted.

19 changes: 0 additions & 19 deletions app/jsconfig.json

This file was deleted.

Loading
Loading