Hi, I'm looking into organizing my project where I...
# help
c
Hi, I'm looking into organizing my project where I have an Apollo "BFF" API and a NextJS project that together form 1 application. According to the guide, its best to have each containing their own stack, but given the simplicity of both services I would rather go for a structure in which 1 SST "app" controls both services. They 'do' however have different deps (for example the BFF has apollo-server-lambda while the NextJS project has Next and React:
Copy code
/app/
/app/package.json
/app/lambda.js
/bff/
/bff/package.json
/bff/lambda.js
/stacks/
/stacks/AppStack.js
/stacks/BFFStack.js
/stacks/index.js // Would deploy both stacks
package.json // Contains SST
sst.json
So essentially the 2 services are "unaware" of SST, they just know about the lambda function. Besides the "how to set this up". Would there be reasons not to do it like this? Why have SST in each service? Its quite a common practice to have the deploy mechanisms outside of each service. What am I missing here?
j
@thdxr not sure if you’ve seen this question from Chris!