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

Development fl server frontend #71

Merged
merged 50 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
fc92132
feat: add sign in page and connection to the api
SalmaElsoly Aug 5, 2024
007b0ab
fix: typo error
Nabil-Salah Aug 5, 2024
2979c84
feat: viewlist and create flist and router
Nabil-Salah Aug 5, 2024
2fee2b7
feat: add follow up page
SalmaElsoly Aug 5, 2024
ecd5cb9
fix: missing field in create flist + add required notation form image…
SalmaElsoly Aug 6, 2024
23a0317
feat: add sign in page and connection to the api
SalmaElsoly Aug 5, 2024
f837c30
feat: viewlist and create flist and router
Nabil-Salah Aug 5, 2024
ab072c7
feat: home page layout + fix navbar links
SalmaElsoly Aug 6, 2024
a850939
feat: home page logic and ui
SalmaElsoly Aug 8, 2024
fcc5160
fix: listing flist in home page
Nabil-Salah Aug 8, 2024
5196d9c
feat: add user flist page
SalmaElsoly Aug 9, 2024
5170c03
fix: saving username across all components
Nabil-Salah Aug 10, 2024
6d1ccca
fix: download link in userlist and home pages
SalmaElsoly Aug 11, 2024
67ec800
fix: add icons
SalmaElsoly Aug 11, 2024
d07a5e3
update icons color
Nabil-Salah Aug 11, 2024
e5484ae
feat: follow up page after creation
SalmaElsoly Aug 11, 2024
bc637b4
fix: polling variable type
SalmaElsoly Aug 12, 2024
a36e093
refactor: download links + add copy link + user side bar in home page
SalmaElsoly Aug 12, 2024
c8103fa
feat: create flists options private or self hosted registery
SalmaElsoly Aug 13, 2024
2e4882f
fix: download and copy link
SalmaElsoly Aug 13, 2024
910a6a5
refactor: edit order of fields
SalmaElsoly Aug 13, 2024
624211b
style: change color
SalmaElsoly Aug 14, 2024
329eaef
feat: add toasts on error
SalmaElsoly Aug 15, 2024
7691e0f
fix: modify images to align with the theme
SalmaElsoly Aug 18, 2024
2d9651e
refactor: remove redundent code in seperate file
Nabil-Salah Aug 15, 2024
fb29f4a
refactor: navbar enchance
Nabil-Salah Aug 18, 2024
94af178
fix: Remove flists folder and config.toml from repository and add the…
Nabil-Salah Aug 18, 2024
b87464a
fix: tables to contain size + add menu in navbar
SalmaElsoly Aug 20, 2024
0149999
fix: spacing in tables
Nabil-Salah Aug 20, 2024
cb6d54a
fix: compacting home table
Nabil-Salah Aug 21, 2024
65a4822
fix: footer size to have fixed size across all pages
SalmaElsoly Aug 21, 2024
2b0690c
fix: tables alignments and font weight
Nabil-Salah Aug 21, 2024
eaceb42
feat: preview flist page
Nabil-Salah Aug 21, 2024
dc14b9c
feat: add more fields in preview page
SalmaElsoly Aug 22, 2024
e940445
feat: add preview flist logic
SalmaElsoly Aug 22, 2024
d35590d
docs: add installation
SalmaElsoly Aug 26, 2024
85c5df9
fix: api of preview page link
Nabil-Salah Aug 22, 2024
5132da5
refactor: remove flist name in preview page from the header, remove c…
Nabil-Salah Aug 26, 2024
90acab8
refactor: remove unnecessary logs + create global style file + combin…
SalmaElsoly Aug 26, 2024
734a7f9
docs: update readme
SalmaElsoly Aug 26, 2024
a551a77
refactor: remove global css to style css + update readme + add toolti…
SalmaElsoly Aug 28, 2024
b7029c8
ci: add docker file
SalmaElsoly Aug 28, 2024
0fec036
reafctor: delagete following uping page for flist to be with create f…
Nabil-Salah Aug 28, 2024
f2f9c29
refactor: lazy loading preview flist + fix routers + move navbar and …
SalmaElsoly Aug 28, 2024
e75ecb5
refactor: add more tooltips + remove unnessecary logs
SalmaElsoly Aug 29, 2024
06dfc3f
fix: login page height + forms button on the right side
SalmaElsoly Aug 29, 2024
e733b5c
fix: route unauth redirecting
Nabil-Salah Aug 29, 2024
b2dda1e
docs: typo in readme
Nabil-Salah Aug 29, 2024
13608d4
refactor: remove unnessecary logs
SalmaElsoly Aug 29, 2024
9889de0
Merge branch 'master' of github.com:threefoldtech/rfs into developmen…
rawdaGastan Sep 12, 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
/tests/*.flist.d
result
.direnv/
fl-server/flists
fl-server/config.toml
1 change: 1 addition & 0 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL="http://localhost:4000"
24 changes: 24 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions frontend/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
13 changes: 13 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
82 changes: 82 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Threefold RFS

## Description

`Threefold RFS` is a frontend that helps manage the RFS server for creating, mounting, and extracting FungiStore lists, or fl for short. An fl is a simple format that stores information about a whole filesystem in a compact way. It doesn't hold the actual data but includes enough details to retrieve the data from a store.

## Prerequesites

- build essentials

```bash
sudo apt-get install build-essential
```

- [node js](https://nodejs.org/en/download/package-manager)
- [rust](https://www.rust-lang.org/tools/install)
SalmaElsoly marked this conversation as resolved.
Show resolved Hide resolved
- Cargo, to be configured to run in the shell
- musl tool

```bash
sudo apt install musl-tools
```

## Installation
SalmaElsoly marked this conversation as resolved.
Show resolved Hide resolved

```bash
git clone https://github.com/threefoldtech/rfs.git
```

### backend

In fl-server dir:

- create flists dir containaing dirs for each user
ex:
- fl-server
- flists
- user1
- user2
- include config file
ex:

```yml
host='localhost'
port=4000
store_url=['dir:///tmp/store0']
flist_dir='flists'

jwt_secret='secret'
jwt_expire_hours=5

[[users]] # list of authorized user in the server
username = "user1"
password = "password1"

[[users]]
username = "user2"
password = "password2"
```

- Move to `fl-server` directory and execute the following command to run the backend:

```bash
cargo run --bin fl-server -- --config-path config.toml
```

### frontend

- Move to `frontend` directory, open new terminal and execute the following commands to run the frontend:

```bash
npm install
npm run dev
```

## Usage
SalmaElsoly marked this conversation as resolved.
Show resolved Hide resolved

- Login with users listed in config.toml with their username and password
- Create Flist
- Preview Flist
- List all Flists
- Download Flist
18 changes: 18 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image" href="./src/assets/logo.png">
<title>Threefold Flist</title>
<link href="./src/style.css" rel="stylesheet">
<link href="https://cdn.materialdesignicons.com/5.4.55/css/materialdesignicons.min.css" rel="stylesheet">
</head>

<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>

</html>
Loading
Loading