Skip to content

Commit

Permalink
feat(Next): Flatten /next to / (root)
Browse files Browse the repository at this point in the history
BREAKING CHANGE Root is now Next.js with /api and /ui legacy apps
  • Loading branch information
danactive committed Apr 7, 2024
1 parent f46e4fc commit 14effd1
Show file tree
Hide file tree
Showing 110 changed files with 78 additions and 243 deletions.
File renamed without changes.
File renamed without changes.
44 changes: 38 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,45 @@
# dependencies
node_modules
npm-debug.log

api/server/plugins/*/public/assets
# testing
/test-results/
playwright-report/
/playwright/.cache/

# next.js
/.next/
/out/

# production
/build
dist

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

build
# typescript
tsconfig.tsbuildinfo

api/node_modules
api/.nyc_output
api/server/plugins/*/public/assets
coverage
.nyc_output
tmp
.env
dist

public/resized
File renamed without changes.
File renamed without changes.
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

File renamed without changes.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Your personal **history** storyboarded with photo and video albums. Associate ph
* Enhanced privacy as photos are stored locally not in the cloud
* Plot thumbnails on a map
* Includes administration tools for XML generation
*

## Project Status:
| Service | Status |
|---|---|
Expand All @@ -17,10 +17,16 @@ Your personal **history** storyboarded with photo and video albums. Associate ph

### Development
1. Node.js v18 LTS [Download](https://nodejs.org/)
1. Folder **app** both the backend and frontend using Next.js
1. Install project dependencies `npm ci`
1. Start web server `npm run dev`
1. View address in browser (printed in terminal on successful load)
2. Install project dependencies `npm ci`

#### How-to run on LOCAL
3. `npm run dev` will standup both the frontend and backend
4. View address in browser (printed in terminal on successful load)

#### How-to build for PROD
3. `npm run build` Bundle JavaScript files, and pre-compile
4. `npm start` Run built app
5. View address in browser (printed in terminal on successful load)

### Legacy Development
1. Node.js v12 [Download](https://nodejs.org/)
Expand All @@ -35,7 +41,7 @@ Your personal **history** storyboarded with photo and video albums. Associate ph
1. To enable Dropbox for hosting photos place Dropbox API v2 access token `HISTORY_DROPBOX_ACCESS_TOKEN=`

## Changelog of releases
See [CHANGELOG](app/CHANGELOG.md)
See [CHANGELOG](CHANGELOG.md)

## Contributing to this open-source project
See [CONTRIBUTING](api/CONTRIBUTING.md)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { testApiHandler } from 'next-test-api-route-handler'

import config from '../../../config.json'
import config from '../../config.json'
import handler from '../../pages/api/galleries/[gallery]/albums/[album]'

describe('Album endpoint', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { testApiHandler } from 'next-test-api-route-handler'

import config from '../../../config.json'
import config from '../../config.json'
import handler from '../../pages/api/galleries/[gallery]/albums'

describe('Albums endpoint', () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { testApiHandler } from 'next-test-api-route-handler'

import config from '../../../config.json'
import config from '../../config.json'
import handler from '../../pages/api/galleries/[gallery]'

describe('Gallery endpoint', () => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions next/.env-example

This file was deleted.

35 changes: 0 additions & 35 deletions next/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions next/README.md

This file was deleted.

Binary file removed next/public/favicon.ico
Binary file not shown.
13 changes: 0 additions & 13 deletions next/public/galleries/demo/gallery.xml

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
94 changes: 0 additions & 94 deletions next/public/galleries/demo/sample.xml

This file was deleted.

4 changes: 0 additions & 4 deletions next/public/vercel.svg

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion next/pages/[gallery].tsx → pages/[gallery].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Head from 'next/head'
import { type ParsedUrlQuery } from 'node:querystring'
import styled, { css } from 'styled-components'

import config from '../../config.json'
import config from '../config.json'
import getAlbums from '../src/lib/albums'
import getGalleries from '../src/lib/galleries'
import indexKeywords from '../src/lib/search'
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion next/pages/[gallery]/all.tsx → pages/[gallery]/all.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useMemo, useRef, useState } from 'react'
import type ReactImageGallery from 'react-image-gallery'
import styled from 'styled-components'

import config from '../../../config.json'
import config from '../../config.json'
import getAlbum from '../../src/lib/album'
import getAlbums from '../../src/lib/albums'
import getGalleries from '../../src/lib/galleries'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { GetStaticPaths, GetStaticProps } from 'next'
import { type ParsedUrlQuery } from 'node:querystring'

import config from '../../../config.json'
import config from '../../config.json'
import getAlbum from '../../src/lib/album'
import getAlbums from '../../src/lib/albums'
import getGalleries from '../../src/lib/galleries'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from 'next/image'

import config from '../../../../config.json'
import config from '../../../config.json'

function Img({
alt,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type DraggableProvided } from '@hello-pangea/dnd'
import React from 'react'
import styled from 'styled-components'

import config from '../../../../config.json'
import config from '../../../config.json'
import { type Filesystem } from '../../lib/filesystems'
import Img from '../Img'
import Link from '../Link'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from 'react'
import Map, { Layer, Source, type MapRef } from 'react-map-gl'

import config from '../../../../config.json'
import config from '../../../config.json'
import type { Item } from '../../types/common'
import AlbumContext from '../Context'
import {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { GeoJSONSourceRaw, LayerProps, ViewState } from 'react-map-gl'
import type { Feature, FeatureCollection } from 'geojson'

import config from '../../../../config.json'
import config from '../../../config.json'

import type { Item } from '../../types/common'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'react-image-gallery/styles/css/image-gallery.css'
import type { MapRef } from 'react-map-gl'
import styled from 'styled-components'

import config from '../../../../config.json'
import config from '../../../config.json'
import { getExt } from '../../utils'
import AlbumContext from '../Context'
import SlippyMap from '../SlippyMap'
Expand Down
Loading

0 comments on commit 14effd1

Please sign in to comment.