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

Convert to a Next + Redux app #35

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8f53cc6
Convert to a Next + Redux app
JacksonMeade Jan 30, 2024
45caf00
Add bin reducers
JacksonMeade Jan 30, 2024
8bebc35
Add flowsheet API service back and Artist Avatar
JacksonMeade Jan 30, 2024
2442df1
Login page complete!
JacksonMeade Jan 30, 2024
4ae4e75
Simplify Catalog Search Table
JacksonMeade Jan 31, 2024
29e3224
Return Card Catalog to function
JacksonMeade Jan 31, 2024
3808032
Import types from ORM
JacksonMeade Jan 31, 2024
464a4ca
Add backend types from Adrian to our library
JacksonMeade Jan 31, 2024
100c92c
Add mapping for rotation retrieval
JacksonMeade Jan 31, 2024
0f149fa
Maintain authorization with backend middleware
JacksonMeade Jan 31, 2024
e06e179
add view style guard
JacksonMeade Feb 1, 2024
0442475
Add classic view and enable catalog search
JacksonMeade Feb 2, 2024
cdc449a
Fix Catalog Classic UI bugs
JacksonMeade Feb 2, 2024
6f12bc4
Add access token auth
JacksonMeade Feb 3, 2024
aa52a6e
Return Flowsheet Search to function
JacksonMeade Feb 3, 2024
cdffcf5
Update readme and allow rotation searching
JacksonMeade Feb 3, 2024
e63b5fa
Finish add to flowsheet search in tsx
JacksonMeade Feb 3, 2024
d38e44a
Add previews for songs back to flowsheet in tsx
JacksonMeade Feb 3, 2024
2dc5028
Add mouse position tracker for dragged and dropped entries
JacksonMeade Feb 3, 2024
2eeb2c3
Add back public favicons and correct rotation color selector
JacksonMeade Feb 3, 2024
0348cec
Eliminate errors from flowsheet entry components
JacksonMeade Feb 3, 2024
523935c
Add Guard against invalid admin access
JacksonMeade Feb 3, 2024
a5b3359
Add initial flowsheet retrieval
JacksonMeade Feb 6, 2024
c116824
Return classic flowsheet page to function
JacksonMeade Feb 6, 2024
222a655
Add classic flowsheet font resizing
JacksonMeade Feb 6, 2024
9c04937
Solve small UI bug
JacksonMeade Feb 6, 2024
b7db8bc
Add isLive functionality
JacksonMeade Feb 6, 2024
4235baf
Require pass down of state on local search
JacksonMeade Feb 6, 2024
cf6a269
Add admin retrieval of DJs
JacksonMeade Feb 7, 2024
79f1368
Merge branch 'main' into dev
JacksonMeade May 27, 2024
578792f
Add administrative list users interface
JacksonMeade May 27, 2024
d8359b3
Add separate rotation page
JacksonMeade May 28, 2024
3d6c19c
Introduce bare-bones calendar code
JacksonMeade May 28, 2024
659385b
Add add dj flow to station management
JacksonMeade May 28, 2024
1375ec1
Split add/remove from bin/queue buttons as their own components
JacksonMeade May 30, 2024
6d7c99d
Catalog adding and removal enabled
JacksonMeade Jun 1, 2024
7fb80e0
Add autocomplete to catalog editing
JacksonMeade Jun 2, 2024
4b3324b
Push add to catalog functionality
JacksonMeade Jun 18, 2024
1105b25
chore: clear up some imports in model types
JacksonMeade Jun 19, 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
14 changes: 7 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:

env:
CI: false
REACT_APP_AWS_USER_POOL_ID: ${{ secrets.AWS_USER_POOL_ID }}
REACT_APP_AWS_REGION: ${{ secrets.AWS_REGION }}
REACT_APP_AWS_CLIENT_ID: ${{ secrets.AWS_CLIENT_ID }}
REACT_APP_AWS_IDENTITY_POOL_ID: ${{ secrets.AWS_IDENTITY_POOL_ID }}
REACT_APP_LAST_FM_KEY: ${{ secrets.LAST_FM_KEY }}
REACT_APP_DISCOGS_CONSUMER_KEY: ${{ secrets.DISCOGS_CONSUMER_KEY }}
REACT_APP_DISCOGS_CONSUMER_SECRET: ${{ secrets.DISCOGS_CONSUMER_SECRET }}
NEXT_PUBLIC_AWS_USER_POOL_ID: ${{ secrets.AWS_USER_POOL_ID }}
NEXT_PUBLIC_AWS_REGION: ${{ secrets.AWS_REGION }}
NEXT_PUBLIC_AWS_CLIENT_ID: ${{ secrets.AWS_CLIENT_ID }}
NEXT_PUBLIC_AWS_IDENTITY_POOL_ID: ${{ secrets.AWS_IDENTITY_POOL_ID }}
NEXT_PUBLIC_LAST_FM_KEY: ${{ secrets.LAST_FM_KEY }}
NEXT_PUBLIC_DISCOGS_CONSUMER_KEY: ${{ secrets.DISCOGS_CONSUMER_KEY }}
NEXT_PUBLIC_DISCOGS_CONSUMER_SECRET: ${{ secrets.DISCOGS_CONSUMER_SECRET }}
25 changes: 14 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,33 @@
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build
/dist

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
*.pem

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

# Environment Variables
.env
.env.build
# local env files
.env*.local

# vercel
.vercel

# Docker local
docker-compose.yml
```
# typescript
*.tsbuildinfo
next-env.d.ts
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[See the site in action here!](https://wxyc.github.io/dj-site/)

![Simplified Map of WXYC Card Catalog Frontend](https://dj.wxyc.org/img/FrontendMap.png)

## Description
The WXYC Card Catalog, Revised is a React-based revision of the original WXYC card catalog and flowsheet. This repository showcases an improved version of the existing catalog and flowsheet, while maintaining the classic theme and preserving the original look. Notably, the revised version is optimized for performance, resulting in faster loading times.
Expand All @@ -14,7 +13,7 @@ The WXYC Card Catalog, Revised is a React-based revision of the original WXYC ca
- Mail Bin: a digital mail bin is available on every account, so DJs can add to the flowsheet directly from their bin without having to type during their sets.

## Deployment
The application is deployed using github pages. In order to deploy to the gh-pages branch, run `npm run deploy`. If you wish to add a commit message to the branch, use `npm run deploy -- -m "YOUR_MESSAGE_HERE"`.
TBD...

## API Integration
The revised catalog leverages services defined in `api-service.js`, which utilizes the popular Axios library to communicate with an AWS API Gateway. This integration allows seamless communication between the front-end application and the API endpoints, enabling data retrieval and manipulation.
Expand All @@ -29,7 +28,7 @@ The revised catalog leverages services defined in `api-service.js`, which utiliz
1. Clone the repository: `git clone https://github.com/WXYC/dj-site.git`
2. Navigate to the project directory: `cd dj-site`
3. Install dependencies: `npm install`
4. Run the application: `npm start`
4. Run the application: `npm run dev`
5. Access the application locally: Open your web browser and visit `http://localhost:3000`

## Contributing
Expand All @@ -45,4 +44,4 @@ Contributions to the WXYC Card Catalog, Revised are welcome! If you would like t
The WXYC Card Catalog, Revised is released under the [MIT License](LICENSE). Feel free to use, modify, and distribute the code as per the terms of this license.

## Acknowledgments
We would like to express our gratitude to the contributors and maintainers of the original WXYC Card Catalog for their valuable work, which served as the foundation for this revised version. In particular, Tim Ross/Tubafrenzy, who developed the original flowsheet site and maintained the database for years during decades when it was much more difficult to maintain and develop a site like this one.
We would like to express our gratitude to the contributors and maintainers of the original WXYC Card Catalog for their valuable work, which served as the foundation for this revised version. In particular, Tim Ross/Tubafrenzy, who developed the original flowsheet site and maintained the database for years during decades when it was much more difficult to maintain and develop a site like this one.
13 changes: 13 additions & 0 deletions app/api/identity-count/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Core */
import { useDispatch, verifySession } from "@/lib/redux";
import { NextResponse } from "next/server";

export async function POST(req: Request, res: Response) {
const body = await req.json();
const { amount = 1 } = body;

// simulate IO latency
await new Promise((r) => setTimeout(r, 500));

return NextResponse.json({ data: amount });
}
48 changes: 48 additions & 0 deletions app/classic/artist/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
'use client';

const ClassicArtistPage = () => {
return (
<div id="searchResultsPanel">

<table cellPadding="10" cellSpacing="1" border={0} style = {{ width: "100%" }}><tbody><tr><td>
</td></tr><tr className="artistCardHeader" style = {{ background: "#CCCCCC" }}>
<th style = {{ width: "20%" }} className="label">
<b>Rock&nbsp;ME 156</b>
</th>
<th style = {{ width: "60%" }} align="center" className="label"><b>Melkbelly</b></th>
<th style = {{ width: "20%" }} align="right" className="label"><b># of releases: 1</b></th>
</tr>
</tbody></table>


<table align="center" cellPadding="10" cellSpacing="1" border={0} style = {{ width: "100%" }}>
<tbody><tr className="searchResultsHeader" style = {{ background: "#CCCCCC" }}>
<th align="left" style = {{ width: "15%" }} className="label sortFieldHighlight" id="libcodeHeader">Library Code</th>
<th align="left" style = {{ width: "28%" }} className="label">Artist</th>
<th align="left" style = {{ width: "35%" }} className="label" id="titleHeader">Title of Release</th>
<th align="left" style = {{ width: "15%" }} className="label" id="formatHeader">Format</th>
<th align="center" style = {{ width: "7%" }} className="label">Comment(s)</th>
</tr>

<tr style = {{ background: "#F3F3F3" }}>
<td className="text">Rock
ME 156/
1
</td>
<td className="text">Melkbelly</td>
<td className="text">Pith</td>
<td className="text">cd</td>
<td align="center" className="text">
<a href="comment?objectType=release&amp;ID=68894">

<img src="/img/commentIcon.jpg" title="Make a comment about this release" />

</a></td>
</tr>

</tbody></table>
</div>
);
}

export default ClassicArtistPage;
Loading