-
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.
* Begin restructure process Use root src as client code, server as the API public as the bundled React App that is then delivered by ExpressJS * Add auth middleware and move image module to services folder * Add DB initialization for roles and default admin user * Add auth routes to server with signin path * Update login to return role name * Add authorization middleware for admin and editor * Add admin routes to create users * Add put and delete routes to API. Remove old server code * Add webpack scripts and get client rendering * Render itemGrid and update to React createRoot * Update readme and set proper watch script * Initial updates to re-implement login logout functionality * Move login dialog and navbar clicks to app * Style the login dialog * Use arrow functions and remove login dialog references where no longer needed * Re-implement Add/Edit dialog * Remove edit dialog from navbar and use props for logout * Raise manage mode to App to pass as props below * Update itemCard to component class and pass manageMode down * Add new dialog to separate add and edit It was getting confusing and difficult to manage various forms of state in a single dialog. Created a new Add dialog to handle creating items only. Cleaned up some commented code and unused imports. * Add trigger prop to App to reload items on add. Reload items on edit * Add error handling in App with alert snackbar * Re-implement edit call in UI * Add refresh function to disable cache control. Pass item errors up * Remove dotenv and use only as dev dependency * Add nodemon dev dependency to watch server as well * Add DISABLE_AUTH env var to skip auth for anonymous access * Add functionality to disable auth * Remove unused code and console log * Remove front-end from compose and expose port
- Loading branch information
Showing
62 changed files
with
15,670 additions
and
42,902 deletions.
There are no files selected for viewing
File renamed without changes.
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,3 @@ | ||
PORT=4040 | ||
MONGO_URI="mongodb://mongo:secretPassword@mongo" | ||
API_KEY="something-secret" |
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 |
---|---|---|
@@ -1,31 +1,16 @@ | ||
# dependencies | ||
**/*/node_modules | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Client | ||
client/src/config/*.json | ||
!client/src/config/default.json | ||
!client/src/config/docker.json | ||
|
||
# testing | ||
client/coverage | ||
|
||
# production | ||
client/build | ||
|
||
# Server | ||
server/src/config/*.json | ||
!server/src/config/default.json | ||
!server/src/config/docker.json | ||
# compiled | ||
public/*.js | ||
public/*.txt |
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,38 @@ | ||
# FROM node:16-alpine as build | ||
# WORKDIR /app | ||
|
||
# COPY package*.json ./ | ||
# COPY public/ ./public/ | ||
|
||
# RUN npm ci --silent | ||
# RUN npm install react-scripts@4.0.3 -g --silent | ||
|
||
# COPY src/ ./src/ | ||
|
||
# RUN npm run build | ||
|
||
# FROM nginx:stable-alpine | ||
# RUN apk add --no-cache jq | ||
|
||
# COPY --from=build /app/build /usr/share/nginx/html | ||
# EXPOSE 80 | ||
|
||
# COPY docker-entrypoint.sh / | ||
# ENTRYPOINT ["/docker-entrypoint.sh"] | ||
# CMD ["nginx", "-g", "daemon off;"] | ||
|
||
# FROM node:16-alpine | ||
# WORKDIR /server | ||
|
||
# ENV NODE_ENV=docker | ||
|
||
# RUN chown node:node /server | ||
# USER node | ||
|
||
# COPY --chown=node:node src/package*.json ./ | ||
|
||
# RUN npm install | ||
|
||
# COPY --chown=node:node src/ ./ | ||
|
||
# CMD ["node", "server.js"] |
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,6 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.