Skip to content

Commit

Permalink
docs: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdaaamn committed Feb 27, 2023
1 parent 2446dfd commit ca1c376
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 29 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DETA_PROJECT_KEY=deta_key
77 changes: 48 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
# Welcome to Remix!
# CosmoCut – Send your short links to space

- [Remix Docs](https://remix.run/docs)
As space exploration advances, so does long clunky URLs that take up valuable space in your expensive cloud do. But you know your personal short links need to stay _personal_. CosmoCut can easily create and share short links for you.

CosmoCut generates short links that are easy to share, saving you time and space. Plus, Space algorithms ensure that your links stay safe and secure in your own personal cloud.

But that's not all - CosmoCut also offers personalized link tracking and analytics. See how many people are clicking on your links, where they're coming from, and even which times of day are most popular. Use this information to optimize your space content and stay ahead of the game.

Whether you're a space enthusiast, developer, or student, CosmoCut is the ultimate tool for sharing and tracking space-related links. Install this on your Space and blast off into a new era of link sharing!

## Deta Space

[Deta Space](https://deta.space/developers) is a personal computer that lives in the cloud — a _personal cloud_. When you install an app, you get a personal copy. The data that app saves to your Space is for you: explore it, extend it, export it. Apps and data in your Space can easily integrate — powered by the personal cloud. Everything on the personal cloud is programmable.

This app is built using Space and Deta infrastructure. You can fork it, clone it, change it, deploy it, or just install it.

<a href="https://deta.space/discovery/r/aypymkqgcxdsmk2w">
<img src="https://deta.space/buttons/dark.svg" height="50" />
</a>

## Development

This app is developed using:

- [Remix](https://remix.run/): framework to create modern, resilient apps
- [tailwindcss](https://tailwindcss.com/) and [tailwindui](https://tailwindui.com/): utility-first CSS framework
- [Deta Space](https://deta.space/docs/en/introduction/app-anatomy): deployment and authentication
- [Deta Base](https://deta.space/docs/en/basics/data#base): database to store links and analytics

### Local development

Fork it, clone it, run remix.

From your terminal:

```sh
Expand All @@ -12,42 +39,34 @@ npm run dev

This starts your app in development mode, rebuilding assets on file changes.

## Deployment

First, build your app for production:
In order to store data in the Base, you will need to set your Deta dev key in your `.env` file (copy `.env.example`):

```sh
npm run build
```

Then run the app in production mode:

```sh
npm start
DETA_PROJECT_KEY=<put_your_project_key_here>
```

Now you'll need to pick a host to deploy it to.

### DIY
Learn how to manage your Deta keys in [Developing with Base and Drive – Space Docs](https://deta.space/docs/en/basics/data#developing-with-base-and-drive).

If you're familiar with deploying node applications, the built-in Remix app server is production-ready.
### Deployment

Make sure to deploy the output of `remix build`
If you want to deploy a different version of this app on Deta Space, follow the [deployment docs](https://deta.space/docs/en/basics/revisions). Otherwise, just [install it](#deta-space).

- `build/`
- `public/build/`
First, create your space project:

### Using a Template
```sh
space new
```

When you ran `npx create-remix@latest` there were a few choices for hosting. You can run that again to create a new project, then copy over your `app/` folder to the new project that's pre-configured for your target server.
Then push to space:

```sh
cd ..
# create a new project, and pick a pre-configured host
npx create-remix@latest
cd my-new-remix-app
# remove the new project's app (not the old one!)
rm -rf app
# copy your app over
cp -R ../my-old-remix-app/app app
space push
```

## Install

See [Deta Space](#deta-space). Just press the button with no extra configuration.

## License

Distributed under the MIT License. See LICENSE for more information.

0 comments on commit ca1c376

Please sign in to comment.