Skip to content

Commit

Permalink
massive app cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lassejaco committed Feb 4, 2025
1 parent 7bc672b commit bec63ea
Show file tree
Hide file tree
Showing 182 changed files with 25 additions and 6,566 deletions.
18 changes: 17 additions & 1 deletion devcon-app/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
Devcon APP service worker caching strategy:
# Install and run the devcon app

To start the devcon app:
yarn install in monorepo/lib
yarn install
yarn dev

Optional:
RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=false in .env to remove some warnings

# Devcon API

The devcon app is served by the devcon api, which is hosted on app.devcon.org.

For outside contributors (e.g. not from the devcon team): Running the API locally is not recommended/difficult, as it requires a lot of setup and access to the devcon database.

# PWA cache/install strategy:

- Precache the app skeleton (basic html/js/css; layout, header, footer, etc.); this allows for fast installation time
- Cache event data at runtime because these datasets are huge (20-30mb) - if these were precached it would extend the precache step significantly, making it very hard to ship updates fast and reliably
Expand Down
51 changes: 4 additions & 47 deletions devcon-app/next.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const withPWA = require('next-pwa')
const webpack = require('webpack')
const { nanoid } = require('nanoid')
const { PHASE_PRODUCTION_BUILD } = require('next/constants')
// const { PHASE_PRODUCTION_BUILD } = require('next/constants')
// const { withSentryConfig } = require('@sentry/nextjs')
const getGeneratedPrecacheEntries = require('./precache')
const getStaticPrecacheEntries = require('./precache-public')
const { withSentryConfig } = require('@sentry/nextjs')
const path = require('path')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const runtimeCache = require('./runtime-cache')
Expand Down Expand Up @@ -170,7 +170,6 @@ const createConfig = phase => {
generateBuildId: () => buildId,
}

// if (phase === PHASE_PRODUCTION_BUILD) {
const pwaConfig = withPWA({
dest: '/public',
additionalManifestEntries: [...getGeneratedPrecacheEntries(buildId) /*, ...getStaticPrecacheEntries({})*/],
Expand All @@ -181,7 +180,7 @@ const createConfig = phase => {
cacheOnFrontEndNav: true,
ignoreURLParametersMatching: [/^session/, /^speaker/, /^room/, /^floor/],
buildExcludes: [/media\/.*$/, /\.map$/],
maximumFileSizeToCacheInBytes: 10000000,
maximumFileSizeToCacheInBytes: 10000000, // this is important, the default file cache size is low, and it can cause some weird problems if certain files aren't cached
runtimeCaching: runtimeCache,
// fallbacks: {
// image:
Expand All @@ -190,48 +189,6 @@ const createConfig = phase => {
})

return pwaConfig(config)
// }

return config
}

// const config = createConfig()

module.exports = createConfig

// module.exports = withSentryConfig(
// (phase, { defaultConfig }) => {
// const buildId = nanoid()

// let config = {
// ...defaultConfig,
// ...nextConfig,
// generateBuildId: () => buildId,
// }

// if (phase === PHASE_PRODUCTION_BUILD) {
// config = withPWA({
// ...config,
// pwa: {
// dest: '/public',
// additionalManifestEntries: [...getGeneratedPrecacheEntries(buildId) /*, ...getStaticPrecacheEntries({})*/],
// mode: 'production',
// dynamicStartUrl: false,
// customWorkerDir: 'workbox',
// cacheOnFrontEndNav: true,
// ignoreURLParametersMatching: [/^session/, /^speaker/, /^room/, /^floor/],
// buildExcludes: [/media\/.*$/, /\.map$/],
// // fallbacks: {
// // image:
// // 'https://images.unsplash.com/photo-1589652717521-10c0d092dea9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
// // },
// },
// })
// }

// return config
// },
// {
// silent: true, // Suppresses all Sentry logs
// }
// )
module.exports = createConfig
Binary file removed devcon-app/src/assets/images/404.png
Binary file not shown.
Binary file removed devcon-app/src/assets/images/app-logo-color.png
Binary file not shown.
16 changes: 0 additions & 16 deletions devcon-app/src/assets/images/app-logo.svg

This file was deleted.

Binary file not shown.
8 changes: 0 additions & 8 deletions devcon-app/src/assets/images/archive/archive-logo-menu.svg

This file was deleted.

3 changes: 0 additions & 3 deletions devcon-app/src/assets/images/archive/archive-logo.svg

This file was deleted.

11 changes: 0 additions & 11 deletions devcon-app/src/assets/images/archive/devcon-logo-archive-old.svg

This file was deleted.

29 changes: 0 additions & 29 deletions devcon-app/src/assets/images/archive/devcon-logo-archive.svg

This file was deleted.

Binary file not shown.
Binary file removed devcon-app/src/assets/images/badger.gif
Binary file not shown.
Binary file removed devcon-app/src/assets/images/badger.webp
Binary file not shown.
Binary file removed devcon-app/src/assets/images/celebrate.gif
Binary file not shown.
Binary file removed devcon-app/src/assets/images/celebrate.webp
Binary file not shown.
Binary file removed devcon-app/src/assets/images/clouds.png
Binary file not shown.
Binary file removed devcon-app/src/assets/images/dance.gif
Binary file not shown.
Binary file removed devcon-app/src/assets/images/dance2.gif
Binary file not shown.
Loading

0 comments on commit bec63ea

Please sign in to comment.