-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add new files and configurations
- Loading branch information
0 parents
commit c21e0e2
Showing
31 changed files
with
2,485 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm install -g pnpm && pnpm install | ||
- name: Install Playwright Browsers | ||
run: pnpm exec playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: pnpm exec playwright test | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 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 | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
*.env | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<img width="1511" alt="image" src="https://github.com/Kazion500/token-secure-share/assets/64147010/81fe2e58-e0f6-4079-8129-b3d69b73da29"> | ||
|
||
# Token Secure Share | ||
|
||
Token Secure Share is a monorepo project that enables users to securely share token secrets by generating one-time links. The project consists of both frontend and backend components. | ||
|
||
## Features | ||
- Generate one-time links: Users can generate unique links that can be used to securely share token secrets. Once the link is accessed, it becomes invalid. | ||
- Secure token sharing: The project ensures that token secrets are shared securely, minimizing the risk of unauthorized access. | ||
- Frontend and backend integration: The frontend and backend components are tightly integrated to provide a seamless user experience. | ||
|
||
## Project Structure | ||
The project follows a monorepo structure with the following main components: | ||
|
||
`frontend/`: Contains the frontend code for the Token Secure Share application. | ||
|
||
`backend/`: Contains the backend code for the Token Secure Share application. | ||
|
||
## Installation | ||
To install and run the Token Secure Share project locally, follow these steps: | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/your-username/token-secure-share.git | ||
``` | ||
|
||
2. Install dependencies for both frontend and backend components. In separate terminal windows, | ||
navigate to the frontend/ and backend/ directories respectively and run the following commands: | ||
|
||
```javascript | ||
cd frontend/ | ||
npm install | ||
|
||
cd ../backend/ | ||
npm install | ||
``` | ||
|
||
3. Configure the project: | ||
|
||
- Frontend: Open the frontend/.env file and provide any necessary configuration variables. | ||
- Backend: Open the backend/.env file and configure the necessary environment variables, such as database connection details, secret keys, etc. | ||
|
||
4. Start the development servers: | ||
|
||
- Frontend: In the frontend/ directory, run: | ||
|
||
```javascript | ||
npm start | ||
``` | ||
|
||
- Backend: In the backend/ directory, run: | ||
|
||
```javascript | ||
npm start | ||
``` | ||
|
||
This will start the frontend and backend servers respectively. | ||
|
||
5. Access the application: | ||
|
||
Open your web browser and navigate to http://localhost:5000 to access the Token Secure Share application. | ||
|
||
## Contributing | ||
Contributions to Token Secure Share are welcome! If you want to contribute to this project, please feel free to submit a pull request. | ||
|
||
## License | ||
This project is licensed under the MIT License. | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + Vue + TS</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "frontend", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vue-tsc && vite build", | ||
"preview": "vite preview --port 3000", | ||
"test:e2e:ui": "pnpm playwright test --ui", | ||
"test:e2e": "pnpm playwright test --project webkit" | ||
}, | ||
"dependencies": { | ||
"axios": "^1.4.0", | ||
"pinia": "^2.1.3", | ||
"vue": "^3.2.47", | ||
"vue-router": "4", | ||
"vue-toast-notification": "^3" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.40.1", | ||
"@types/node": "^20.2.1", | ||
"@vitejs/plugin-vue": "^4.1.0", | ||
"autoprefixer": "^10.4.14", | ||
"postcss": "^8.4.23", | ||
"tailwindcss": "^3.3.2", | ||
"typescript": "^5.0.2", | ||
"vite": "^4.3.2", | ||
"vue-tsc": "^1.4.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import { defineConfig, devices } from "@playwright/test"; | ||
|
||
/** | ||
* Read environment variables from file. | ||
* https://github.com/motdotla/dotenv | ||
*/ | ||
// require('dotenv').config(); | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
export default defineConfig({ | ||
testDir: "./tests", | ||
/* Run tests in files in parallel */ | ||
fullyParallel: true, | ||
/* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
forbidOnly: !!process.env.CI, | ||
/* Retry on CI only */ | ||
retries: process.env.CI ? 2 : 0, | ||
/* Opt out of parallel tests on CI. */ | ||
workers: process.env.CI ? 1 : undefined, | ||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
reporter: "html", | ||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
use: { | ||
/* Base URL to use in actions like `await page.goto('/')`. */ | ||
baseURL: "http://localhost:3000", | ||
|
||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
trace: "on-first-retry", | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: "chromium", | ||
use: { ...devices["Desktop Chrome"] }, | ||
}, | ||
|
||
{ | ||
name: "firefox", | ||
use: { ...devices["Desktop Firefox"] }, | ||
}, | ||
|
||
{ | ||
name: "webkit", | ||
use: { ...devices["Desktop Safari"] }, | ||
}, | ||
|
||
/* Test against mobile viewports. */ | ||
// { | ||
// name: 'Mobile Chrome', | ||
// use: { ...devices['Pixel 5'] }, | ||
// }, | ||
// { | ||
// name: 'Mobile Safari', | ||
// use: { ...devices['iPhone 12'] }, | ||
// }, | ||
|
||
/* Test against branded browsers. */ | ||
// { | ||
// name: 'Microsoft Edge', | ||
// use: { ...devices['Desktop Edge'], channel: 'msedge' }, | ||
// }, | ||
// { | ||
// name: 'Google Chrome', | ||
// use: { ...devices['Desktop Chrome'], channel: 'chrome' }, | ||
// }, | ||
], | ||
|
||
/* Run your local dev server before starting the tests */ | ||
webServer: { | ||
command: "pnpm build && pnpm preview", | ||
url: "http://localhost:3000", | ||
reuseExistingServer: !process.env.CI, | ||
}, | ||
}); |
Oops, something went wrong.