## Getting started
To create a new [Cloudscape](https://cloudscape.design/) React Typescript Project, there are a couple of options:
### Via Projen CLI
```
npx projen new --from @aws-prototyping-sdk/cloudscape-react-ts-website cloudscape-react-ts-website [--application-name <your-app>]
```
### Programmatically
```python
new CloudscapeReactTsWebsiteProject({
defaultReleaseBranch: "mainline",
name: "<name-of-package>",
applicationName: "<name-of-app>",
});
```
### Running your synthesized Application
To run your synthesized application locally, run `npx projen dev`.
## Developer Notes
To enable Cognito auth, ensure you have a runtime-config.json file in the root of your deployed project which at least contains the following:
```json
{
"region": "<aws-region>",
"identityPoolId":"<identity-pool-id>",
"userPoolId":"<user-pool-id>",
"userPoolWebClientId":"<user-pool-web-client-id>"
}
```
The easiest way to get this set up is to use the static-website + identity packages to deploy your website.
An example of how to do this is as follows:
```python
const userIdentity = new UserIdentity(this, 'UserIdentity');
new StaticWebsite(this, 'StaticWebsite', {
websiteContentPath: '<relative>/<path>/<to>/<built>/<website>',
runtimeOptions: {
jsonPayload: {
region: Stack.of(this).region,
identityPoolId: userIdentity.identityPool.identityPoolId,
userPoolId: userIdentity.userPool?.userPoolId,
userPoolWebClientId: userIdentity.userPoolClient?.userPoolClientId,
}
},
});
```
For local development, you will need to copy the generated runtime-config.json file into your /public directory. An example on how to do this is as follows:
```
curl https://dxxxxxxxxxx.cloudfront.net/runtime-config.json > public/runtime-config.json
```
Raw data
{
"_id": null,
"home_page": "https://github.com/aws/aws-prototyping-sdk",
"name": "aws-prototyping-sdk.cloudscape-react-ts-website",
"maintainer": "",
"docs_url": null,
"requires_python": "~=3.7",
"maintainer_email": "",
"keywords": "",
"author": "AWS APJ COPE<apj-cope@amazon.com>",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/5d/c1/cf334199e137e75801b8b948fc8d95d52403cb711a0d88a531b5dc7e7858/aws_prototyping_sdk.cloudscape_react_ts_website-0.19.68.tar.gz",
"platform": null,
"description": "## Getting started\n\nTo create a new [Cloudscape](https://cloudscape.design/) React Typescript Project, there are a couple of options:\n\n### Via Projen CLI\n\n```\nnpx projen new --from @aws-prototyping-sdk/cloudscape-react-ts-website cloudscape-react-ts-website [--application-name <your-app>]\n```\n\n### Programmatically\n\n```python\nnew CloudscapeReactTsWebsiteProject({\n defaultReleaseBranch: \"mainline\",\n name: \"<name-of-package>\",\n applicationName: \"<name-of-app>\",\n});\n```\n\n### Running your synthesized Application\n\nTo run your synthesized application locally, run `npx projen dev`.\n\n## Developer Notes\n\nTo enable Cognito auth, ensure you have a runtime-config.json file in the root of your deployed project which at least contains the following:\n\n```json\n{\n \"region\": \"<aws-region>\",\n \"identityPoolId\":\"<identity-pool-id>\",\n \"userPoolId\":\"<user-pool-id>\",\n \"userPoolWebClientId\":\"<user-pool-web-client-id>\"\n}\n```\n\nThe easiest way to get this set up is to use the static-website + identity packages to deploy your website.\n\nAn example of how to do this is as follows:\n\n```python\nconst userIdentity = new UserIdentity(this, 'UserIdentity');\nnew StaticWebsite(this, 'StaticWebsite', {\n websiteContentPath: '<relative>/<path>/<to>/<built>/<website>',\n runtimeOptions: {\n jsonPayload: {\n region: Stack.of(this).region,\n identityPoolId: userIdentity.identityPool.identityPoolId,\n userPoolId: userIdentity.userPool?.userPoolId,\n userPoolWebClientId: userIdentity.userPoolClient?.userPoolClientId,\n }\n },\n});\n```\n\nFor local development, you will need to copy the generated runtime-config.json file into your /public directory. An example on how to do this is as follows:\n\n```\ncurl https://dxxxxxxxxxx.cloudfront.net/runtime-config.json > public/runtime-config.json\n```\n\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "@aws-prototyping-sdk/cloudscape-react-ts-website",
"version": "0.19.68",
"project_urls": {
"Homepage": "https://github.com/aws/aws-prototyping-sdk",
"Source": "https://github.com/aws/aws-prototyping-sdk"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8355b3f3bd5a55933185e95b744c6a32a769c7efed7d44c5f455139d975f92b3",
"md5": "ff91a9c347b4ce1772f12a1a3f1a3b7e",
"sha256": "ab2582a5921ccad5c0c4eb85e6567d8e37b278240892b6d6e762cbe773e13184"
},
"downloads": -1,
"filename": "aws_prototyping_sdk.cloudscape_react_ts_website-0.19.68-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff91a9c347b4ce1772f12a1a3f1a3b7e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.7",
"size": 204830,
"upload_time": "2023-08-24T23:16:41",
"upload_time_iso_8601": "2023-08-24T23:16:41.716269Z",
"url": "https://files.pythonhosted.org/packages/83/55/b3f3bd5a55933185e95b744c6a32a769c7efed7d44c5f455139d975f92b3/aws_prototyping_sdk.cloudscape_react_ts_website-0.19.68-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5dc1cf334199e137e75801b8b948fc8d95d52403cb711a0d88a531b5dc7e7858",
"md5": "8dee2766e74bedf93fe7d72474c57d8c",
"sha256": "df59005469a4ce9c32df827f0dd36a2a612d8fd5e54c039bd0243d32ab47e659"
},
"downloads": -1,
"filename": "aws_prototyping_sdk.cloudscape_react_ts_website-0.19.68.tar.gz",
"has_sig": false,
"md5_digest": "8dee2766e74bedf93fe7d72474c57d8c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.7",
"size": 206197,
"upload_time": "2023-08-24T23:16:43",
"upload_time_iso_8601": "2023-08-24T23:16:43.052408Z",
"url": "https://files.pythonhosted.org/packages/5d/c1/cf334199e137e75801b8b948fc8d95d52403cb711a0d88a531b5dc7e7858/aws_prototyping_sdk.cloudscape_react_ts_website-0.19.68.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-24 23:16:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aws",
"github_project": "aws-prototyping-sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "aws-prototyping-sdk.cloudscape-react-ts-website"
}