This project is a work in progress. Most planned features are not yet implemented, and we are coming up with a list of features and a plan/roadmap for their implementation.
This repository contains the source and demonstrations for the catalog of self-describing assets, a contribution from the Central Intelligence Platform Team.
This is a Next.js project bootstrapped with create-next-app
.
Prettier is used for handling styling automatically. This tool runs on all code in a pre-commit step. It is recommended to also use prettier in your IDE so you see those prettier-related changes in your code prior to commit. The vscode-related config is already included in this project, but it requires the extension to be installed with the following command:
code --install-extension esbenp.prettier-vscode
You could also enable Format on save
in vscode settings, which would ensure syntax changes this extension will make automatically appear on save.
npm install
When in development mode, the app uses environment variables found in env.development
.
The app requires a back-end API available, and a mock version of this API server is included in the project.
Below are steps to start the mock API server, update the back-end state, and then see changes in a web client.
- in terminal 1, start mock API server:
NODE_ENV=development npm run start-mock-api
- in terminal 2, start front-end server:
npm run dev
- Continue with steps in the this section below.
The following steps assume you are running the app in production on your local laptop.
The steps would be slightly different regarding hostname and .env
handling when deploying
to a cloud provider or other remote server.
localhost
cannot be used when in production mode. Instead add a new hostname for your laptop to/etc/hosts
:
echo '127.0.0.1 laptop.internal' | sudo tee -a /etc/hosts
- Copy the dev
.env
file for production:
cp .env.development .env.production.local
sed -i 's/localhost/laptop.internal/' .env.production.local
If on a mac, the sed
command above will fail. Follow these steps:
brew install gnu-sed
gsed -i 's/localhost/laptop.internal/' .env.production.local
- in terminal 1, start mock API server in production mode:
NODE_ENV=production npm run start-mock-api
- in terminal 2, start front-end server in production mode:
npm run build
npm start
- Continue with steps in the this section below.
The environment is ready for validation after following either development or production steps above.
- in browser view initial static content: http://localhost:3000
- in terminal 3, update data in mock API server:
curl -X POST \
-H "Content-Type: text/plain" \
-d "{\"date\":\"2022-04-01T15:49:35.759Z\",\"title\":\"publish fix\",\"content\":\"some content\"}" \
http://localhost:3001/posts
- mock server calls front-end server webhook (automatic)
- front-end requests data from mock API server and regenerates static content (automatic)
- refresh page to see new static content
You can start editing the page by modifying pages/index.js
. The page auto-updates as you edit the file.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Below are links to the team. Contact Josh Purcell with any questions.
- https://github.com/archana-ravindar
- https://github.com/dasanind
- https://github.com/dineshverma
- https://github.com/edelsohn
- https://github.com/jankivora
- https://github.com/jriviere0316
- https://github.com/rahulbatra85
- https://github.com/shirley336
- https://github.com/vuldin
Meetings are held bi-weekly on Wednesday at 5pm Eastern (UTC-5). Contact Josh (details above) for zoom details. Meeting minutes (if any) will be posted here.