damonsk / onlinewardleymaps

OnlineWardleyMaps.com - Draw Wardley Maps in seconds using this free online tool
https://onlinewardleymaps.com/
MIT License
236 stars 59 forks source link

Missing dependencies #170

Closed Heiss closed 8 months ago

Heiss commented 8 months ago

Hey,

i wanted to yarn build the assets, but got "module not found: Can't resolve ' ../../../aws-exports'. It comes from https://github.com/damonsk/onlinewardleymaps/blob/a275263b8d3c9fa30a280b0ed85c002d9cf275f4/frontend/src/lib/amplify/awsConfig.js#L2

I used "yarn install" and "yarn build" as suggested in readme.

What is missing here?

Thank you. Have a great day.

damonsk commented 8 months ago

Hi @Heiss

Apologies with the recent beta merge I've not updated the readme.

The project depends on AWS Amplify and an AWS account as it creates supporting infrastructure (for saving maps and serving accounts).

Install Amplify

npm install -g @aws-amplify/cli

Navigate to the frontend folder in Terminal/Bash and initialise amplify.

cd frontend/
amplify init

The infrastructure that will be created is defined here https://github.com/damonsk/onlinewardleymaps/tree/master/frontend/amplify/backend

The costs will be minimal as it's based on serverless offerings and likely covered under the Free Tier if you have a new account.

For additional info on getting started with amplify, https://docs.amplify.aws/javascript/start/getting-started/installation/

Heiss commented 8 months ago

Thank you for your fast answer.

Do i understand it correctly, that there is no way to run this app local only?

I asked, because i want to integrate it into my workflow with asciidoc (maybe i need to implement a service for kroki, suggested here https://github.com/yuzutech/kroki/issues/179), which has to be local only.

damonsk commented 8 months ago

I "think" it will be possible - Create the aws-exports.js file in frontend/ folder with the following content.

const awsmobile = {};
export default awsmobile;

The AWS infra is used for some new features which are not yet live and behind a feature switch (https://github.com/damonsk/onlinewardleymaps/blob/44ce638d9a1bef6e629301a840280a904cbc20e4/frontend/src/constants/featureswitches.js#L2)

damonsk commented 8 months ago

On a side note, you can check out the classic branch as this doesn't have the deps on Amplify https://github.com/damonsk/onlinewardleymaps/tree/classic

Runs at https://classic.onlinewardleymaps.com.

Just note, features will start to drift as it won't receive future updates.

This may also be of interest. https://github.com/damonsk/onlinewardleymaps/pull/75

damonsk commented 8 months ago

hopefully you're up and running, any more problems feel free to re-open.

Heiss commented 8 months ago

I created the PR in kroki now. Feel free to take a look at it. It is mostly the approach from #75 with some tweaks for kroki.