Skip to content

Commit

Permalink
feat: added manifest and necessary icons for pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
ElfenB committed Jul 5, 2024
1 parent 968b11d commit 9b81b19
Show file tree
Hide file tree
Showing 31 changed files with 238 additions and 43 deletions.
90 changes: 90 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@

# job-search-portal (Jobber)

[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)

This project is a job search portal that allows users to search for jobs and apply for them.

The generic name *job-search-portal* was the initial project name. During development, the more brand-ready name *Jobber* was born.

## Demo

Deployment should be available at: [Jobber](https://jobber.benelfen.com)

## Tech Stack

**Client:** Ionic, React, Auth0

**Server:** TRPC, Prisma, PostgreSQL

**Deployment:** Docker, Compose

## Run Locally

Clone the project

```bash
git clone https://github.com/ElfenB/job-search-portal.git
```

Go to the project directory

```bash
cd job-search-portal
```

Make sure, environment variables are specified

```bash
cp .env.example .env
# Edit as required
```

Setup database if required

```bash
# Install Postgres Helm Chart
task -d postgres prepare

# Deploy database to K8s cluster (e.g. with Docker Desktop or Minikube)
task -d postgres deploy

# Get Postgres password
task -d posgres get-pass

# Tunnel database
task -d postgres port-forward
```

Start the server (dependencies should be automatically installed by predev script)

```bash
# Frontend
npm run dev

# Migrate database
npm run db:migrate-dev

# Backend
npm run dev:server
```

## Deployment

To deploy this project run

```bash
docker compose up -d --build
```

## Authors

- [@ElfenB](https://www.github.com/ElfenB)

## Acknowledgements

This README was generated using [readme.so](https://readme.so/)

## License

[MIT](https://choosealicense.com/licenses/mit/)
11 changes: 9 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />

<link rel="manifest" href="/manifest.json" />
<!-- Generated using https://realfavicongenerator.net/ -->
<meta name="msapplication-TileColor" content="#038260" />
<meta name="theme-color" content="#038260" />

<link rel="shortcut icon" type="image/png" href="/jobber-dark.svg" />
<!-- Generated using https://realfavicongenerator.net/ -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/manifest.webmanifest" />
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#038260" />

<!-- add to home screen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions public/assets/avatar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
12 changes: 0 additions & 12 deletions public/avatar.svg

This file was deleted.

9 changes: 9 additions & 0 deletions public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#038260</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
Binary file removed public/favicon.png
Binary file not shown.
21 changes: 0 additions & 21 deletions public/manifest.json

This file was deleted.

Binary file added public/mstile-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-310x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions public/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#038260",
"background_color": "#038260",
"display": "standalone"
}
2 changes: 1 addition & 1 deletion src/components/ChatList.consts.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Source: https://ionicframework.com/docs/img/demos/avatar.svg
export const fallbackUserImage = './avatar.svg';
export const fallbackUserImage = './assets/avatar.svg';
2 changes: 1 addition & 1 deletion src/components/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function Logo({ slot, style }: Props) {
>
<img
alt="Jobber logo"
src={darkMode ? '/jobber-dark.svg' : '/jobber.svg'}
src={darkMode ? '/assets/jobber-dark.svg' : '/assets/jobber.svg'}
style={{ height: '3rem', rotate: rotate ? '30deg' : undefined, transition: 'rotate 0.25s ease', ...style }}
/>
</span>
Expand Down
6 changes: 2 additions & 4 deletions src/components/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ import {
IonListHeader,
} from '@ionic/react';
import { useTranslation } from 'react-i18next';
import { fallbackUserImage } from './ChatList.consts';
import { Rating } from './Rating';

export function UserProfile() {
const { t } = useTranslation();
const { isLoading, user } = useAuth0();

const userImage = useMemo(
() =>
!user?.picture || user.picture.length === 0
? 'https://ionicframework.com/docs/img/demos/avatar.svg'
: user.picture,
() => (!user?.picture || user.picture.length === 0 ? fallbackUserImage : user.picture),
[user?.picture],
);

Expand Down
1 change: 0 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ root.render(
);

// FOCUS:
// - Add feedback button inside app (e.g. mailto:[email protected] ==> check mail settings)
// - Add possibility to accept jobs

// TODO: Add chat functionality (BE and FE) ==> Look for libraries
Expand Down
23 changes: 22 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable camelcase -- Manifest naming convention */

import legacy from '@vitejs/plugin-legacy';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
Expand All @@ -11,6 +13,25 @@ export default defineConfig({
plugins: [react(), legacy(), VitePWA({
devOptions: {
enabled: true
}, registerType: 'autoUpdate'
},
manifest: {
description: 'Job Search Portal',
icons: [
{
sizes: '192x192',
src: 'android-chrome-192x192.png',
type: 'image/png'
},
{
sizes: '512x512',
src: 'android-chrome-512x512.png',
type: 'image/png'
}
],
name: 'Jobber',
short_name: 'Jobber',
theme_color: '#038260'
},
registerType: 'autoUpdate'
})],
});

0 comments on commit 9b81b19

Please sign in to comment.