Coder Social home page Coder Social logo

docsite's Introduction

Wing Banner

Welcome to the Wing Language! ๐Ÿ‘‹

Take a Tour โ–ช๏ธŽ Getting Started โ–ช๏ธŽ Join Slack โ–ช๏ธŽ FAQ โ–ช๏ธŽ Roadmap โ–ช๏ธŽ Issues โ–ช๏ธŽ Discussions โ–ช๏ธŽ Contribute

Winglang is a new open-source programming language designed for the cloud (aka "cloud-oriented"). Wing enables developers to build distributed systems that leverage cloud services as first-class citizens by combining infrastructure and application code in a safe and unified programming model (aka "cloud-oriented"). Wing programs can be executed locally (yes, no internet required) using a fully-functional simulator, or deployed to any cloud provider (yes, Wing programs are portable across providers).

The mission of Winglang is to bring back your creative flow and close the gap between imagination and creation.

Developing for the cloud today requires mastering various layers of the cloud stack, IAM roles, networking, and numerous tools, along with finding creative ways to test and debug code. In addition, long deployment times hinder iteration cycles and take developers out of their creative flow.

Winglang addresses these pains by letting you work at a higher level of abstraction and allowing you to focus on business logic instead of cloud mechanics, only surfacing low-level details when it's needed. We also provide you with a set of tools that let you test your code locally, significantly faster than before.

Wing Demo

Wing is built by Elad Ben-Israel, the guy behind the AWS CDK, the gang at the Wing Cloud team and an amazing community of contributors (also known as Wingnuts).

Click here to watch a short video introduction to the Wing language.

Why do we think the cloud needs a programming language? ๐Ÿค”

Cloud applications are fundamentally different from applications that run on a single machine - they are distributed systems that rely on cloud infrastructure to achieve their goals.

In order to be able to express both infrastructure and application logic in a safe and unified programming model, Winglang has two execution phases: preflight for infrastructure definitions and inflight for runtime code.

Preflight code is executed during compilation and produces the infrastructure configuration for your app (e.g. Terraform, CloudFormation, etc). Inflight code is compiled into JavaScript and executed within cloud compute platforms in Node.js environments.

Let's look at a simple example:

bring cloud;

let queue = new cloud.Queue();
let counter = new cloud.Counter();
let bucket = new cloud.Bucket();

queue.setConsumer(inflight (message) => {
  let i = counter.inc();
  bucket.put("file-{i}.txt", message);
});

cloud.Queue, cloud.Counter and cloud.Bucket are preflight objects. They represent cloud infrastructure resources. When compiled to a specific cloud provider, such as AWS, a Terraform file will be produced with the provider's implementation of these resources. The queue.setConsumer() method is a preflight method that configures the infrastructure to invoke a particular inflight function for each message in the queue.

Now comes the cool part: the code that runs inside the inflight function interacts with the counter and the bucket objects through their inflight methods (counter.inc() and bucket.put()). These methods can only be called from inflight scopes.

Very cool, but what here cannot be done by a library or compiler extension?

In existing languages, where there is no way to distinguish between multiple execution phases, it is impossible to naturally represent this idea that an object has methods that can only be executed from within a specific execution phase (or within certain scopes of the program). You are welcome to read more about it here (including code samples that show the same app built in Wing vs. other solutions).

What makes Wing a good fit for cloud development? ๐ŸŒŸ

Wing was built from scratch to make it easy for building applications on any cloud. It includes an assembly of different features that serve that purpose:

For a more in-depth look at Wing's features and benefits, check out our documentation.

Getting started ๐Ÿ› ๏ธ

๐Ÿšง This is a pre-release, please see our project status for more details.

If you'd just like to dip your feet in the water and see what Wing is all about, you can try it out in our online playground or walk through the interactive tour.

When you're ready to start building your own Wing apps, you'll need to:

  1. Install the Wing CLI.
  2. Get the Wing IDE Extension for your favorite editor.
  3. Launch the Wing Console and take it for a spin!

For a step-by-step guide, head over to our Getting Started guide. It's a once-in-a-lifetime adventure into the Wing rabbit hole!

FAQs โ“

Here are some questions we're commonly asked that are covered by our FAQ:

Community ๐Ÿ’ฌ

Join our flock in the Wing Slack community. We're here to help each other, answer questions, and share our cloud adventures. Alternatively, post any questions on GitHub Discussions.

Contributing ๐Ÿค

Want to help Wing take flight? Check out our contribution guide to learn how to set up a development environment and contribute to the project. You can also get started by opening the project in GitHub Codespaces.

Open in GitHub Codespaces

We are incredibly grateful to our entire community for contributing bug fixes and improvements:

License ๐Ÿ“œ

Wing is licensed under the MIT License. Contributions are made under our contribution license.

Happy coding, and remember: the sky's the limit with Wing (yes, another pun)! ๐ŸŒค๏ธ๐Ÿš€

docsite's People

Contributors

ainvoner avatar amielpb avatar chriscbr avatar dannac2 avatar ekeren avatar eladb avatar hasanaburayyan avatar markmcculloh avatar mbonig avatar melissamcewen avatar monadabot avatar nathantarbert avatar polamoros avatar revitalbarletz avatar shaiber avatar singledigit avatar skyrpex avatar staycoolcall911 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docsite's Issues

typo in sdk-architecture

Can't create a PR because forking is disabled.

Through polycons, when a user writes `new cloud.Bucket()` within the scope of an AWS `App`, the constructor of `cloud.Bucket` will automatically look up the polycon factory associated with the construct tree, and call the factory's `resolve` method to produce the class instance specific to that clodu target (`new tfaws.Bucket()`), and return that back to the caller.

has clodu target instead of cloud target

Cheers โœŒ๏ธ

footer

DOD:

  • remove twitter link
  • github links should go to winglang/wing

Landing page (Guts)

DOD for us:

  • hosting is owed by us (monada
  • embedded typeform
  • analytics

DOD for monada:

  • add cookie consent
  • add the blog
  • link to docs.winglang.io

footer content

Currently this is our footer:
image

structure:

  • Documentation
    • Getting started
    • Contributors Handbook
    • Language Reference
    • SDK Reference
  • Get Help
    • github discussion
    • slack
    • stackoverflow
  • Terms and Policies
    • Contributors terms of service
    • Contribution license

Cookie consent

We need to add a cookie consent since we are planning to install analytics on the website.

Forbidden during npm login with just read:packages and no repo permissions

My personal github token from November 2022 expired, so I went through the steps to generate a new one. The docs now say only read:packages is required here. However, that results in a forbidden error during npm login. If I add repo permissions like the previous instructions, I can login. What are the actual minimum permissions needed?

With read:packages and no repo permissions:

npm login --scope=@winglang --registry=https://npm.pkg.github.com
npm WARN adduser `adduser` will be split into `login` and `register` in a future version. `adduser` will become an alias of `register`. `login` (currently an alias) will become its own command.
npm notice Log in on https://npm.pkg.github.com/
Username: perpil
Password:
Email: (this IS public) [email protected]
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://npm.pkg.github.com/-/user/org.couchdb.user:perpil - Permission denied
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxxxx/.npm/_logs/2023-01-03T18_29_48_236Z-debug-0.log

With read: packages and repo:* permissions

โฏ npm login --scope=@winglang --registry=https://npm.pkg.github.com
npm WARN adduser `adduser` will be split into `login` and `register` in a future version. `adduser` will become an alias of `register`. `login` (currently an alias) will become its own command.
npm notice Log in on https://npm.pkg.github.com/
Username: perpil
Password:
Email: (this IS public) [email protected]
Logged in as perpil to scope @winglang on https://npm.pkg.github.com/.

can't link to a specific section in doc.winglang.io

I tried this

Go directly to https://docs.winglang.io/concepts/simulator#using-the-simulator-api-in-wing

Expected

I expected to jump directly to the right location of the "using-the-simulator-api-in-wing" section in the file

Instead, this happened

I landed in the top of the doc

Component

Documentation

Environment

- Wing Version: NA
- OS: NA
- Node version:NA

Anything else?

It used to work, I found a vercel site that has this working https://website-5wr130rjs-monada.vercel.app/concepts/simulator#using-the-simulator-api-in-wing

slack discussion: https://winglang.slack.com/archives/C048QCN2XLJ/p1669154174786549

Unable to start local documentation website without AUTH0 keys

I tried this

I've tried to run this:

npm run docs

Expected

A browser with a local instance of our docsite.

Instead, this happened

Browser tries to access:

https://undefined/authorize?redirect_uri=https%3A%2F%2Fundefined%2F&scope=openid%20profile%20email&...

Component

No response

Environment

- Wing Version:
- OS:
- Node version:

Anything else?

No response

Automate docs update and versioning from wing/docs

Description

We want our https://github.com/winglang/wing/tree/main/docs to have the following structure of empty docs who will later be created by @eladb (see winglang/website#66)

We also want to make sure that our docsite has the proper automation to copy the same structure and present it under winglang.io/docs right panel

structure:

  • Introduction - content from README
    * Welcome
    * Rationale
  • Getting started - content from README
    * Installation
    * Hello, Wing!
  • FAQ (@revitalbarletz had started to collect a list of frequently asked questions. This is where we answer them)
    - Why did we create wing
    - What features are supported and not supported (roadmap)
  • Language Reference - let's use the spec for now.
    • SDK Reference - output of jsii-docgen with tweaks for wingsdk.
    • CLI Reference - output of --help for now

DOD

winglang/wing:

  • Add a job to wing release workflow to zip the docs directory content and add as an asset to the newly created release in github.

winglang/docsite:

  • Create a workflow in docsite to pull new release docs and version number from winglang/wing
  • fix current docs version (docusaurus command)
  • extract zip to docs dir
  • create new release (docusaurus command)
  • issue new PR with the new content
  • auto merge PR (P3)

Authorization is driven from pipedrive and not github

Currently when a user is authenticated in auth0 a hook in the login process checks Pipedrive for the user and, if in the proper invite stage of the deal, adds a Role to the user which is used in the docs site for authorization to the documentation.

However, based on this comment: https://monadahq.slack.com/archives/C04BG1M439S/p1668699517184039, the check should occur against Github and not Pipedrive, looking to see if the user is part of the Contributor group (or, more generally, has access to the repo).

Short Videos

In addition to the Wingly extracts, we'd like to create some more videos that are hard to do in that way.
We're not gonna invest a lot of resources in them, just pick low hanging fruit with high potential.

Some ideas:

  • FAQ (some 20 questions and their answers. Film different people respond. Use materials in our documentation too)
  • Short "Wing in 30 seconds" videos. Experiment with differnet styles and different messaging for different audiences. Use mainly VSC + Console screen recordings
  • Short "Just wing it" videos. Show day to day struggles of cloud devs and then how we solve these pains with Wing

Documentation website URLs are weird

I tried this

I am browsing through the documentation website, and clicking through the topics.

Expected

I expect the URLs of the pages to have a nice "sluggified" name, all lowercase. You know... good web style.

Something like:

Instead, this happened

Component

Documentation

Environment

- Wing Version:
- OS:
- Node version:

Anything else?

I think we need to make sure the id attribute in the docs are nice slugs.

Docsite: missing global version selector

I tried this

I want to be able to select the Wing version for the entire documentation site, not just the API reference.

Expected

I expect some kind of a global version selector:

Here's the one in the https://docusaurus.io/docs site:

version-selector

Instead, this happened

I don't see any version selector, I just see some version numbers in the API reference.

Component

Documentation

Environment

N/A

Anything else?

No response

header

DOD:

  • remove twitter link
  • add latest version for doc only (if possible)
  • github links should go to winglang/wing

Docsite: shouldn't have a landing page

I tried this

When I go to docs.winglang.io

Expected

I expected to land here:

Screen Shot 2022-11-10 at 8 36 22

Instead, this happened

I see some kind of landing page:

Uploading Screen Shot 2022-11-10 at 8.35.56.pngโ€ฆ

Component

Documentation

Environment

N/A

Anything else?

No response

Inflight Magazine #1

Target date: 12/22/2022

Let's use this issue to track any issues we want to mention the Inflight Magazine. Just add comments here with any topic and @mbonig will pick this up from there.

winglang.io og tags

We want our webpage to preset well when shared in social and for SEO

Resources:

DOD:

  • when our site is shared on twitter/linkedin/facebook it should look nice and to the point
  • make sure that our winglang.io has the right preview
  • make sure our specific blog has the right preview
  • make sure our specific doc pages has the right preview

docs.winglang.io

When a user is land in docs.winglang.io he should not be able to see the docs, unless he was authorised and part of the contributors / maintainers github teams

General:

  • switch back to docs.winglang.io
  • remove the blog
  • remove landing page

If user is not authenticated he should see:

  • should redirect to auth0 authentication page

If he is already authenticated but not authorised (not part of contributors / maintainers) he should see:

design required: @ekeren

  • design for authenticated but not authorised

Move docs.winglang.io => winglang.io

We decided to use the doc site as our main site framework. The blog is already merged in there and we will put the landing page as well.

Please make sure it's password protected via Vercel.

@MarkMcCulloh wrote:

If it's worth rolling the blog into the docs site does it also make sense to roll the landing page into the docs site and just make winglang.io be the landing, docs, and blog site?

Yes I was thinking that too. Okay!

Let's make this what's behind winglang.io and use this framework for the entire site. Much simpler and cleaner!

Once we have the landing page artifacts I will add them to this repo (which we should rename winglang/website I guess)

Originally posted by @eladb in #55 (comment)

Blog: First Blog Post

Summary

We need a first blog post

Feature Spec

It should lay the groundwork for wing.

Use Cases

No response

Implementation Notes

No response

Component

No response

authentication fails with bad redirects on any new branches.

Auth0 requires an explicit definition of redirect urls during the signin process:

image

However, since every new branch of the docsite produces a new URL for the preview site, both auth0 needs to be updated to allow this redirect URL and the environment variables need to be updated on the preview to tell the site what the URL is that Vercel assigned to it. This makes previewing new builds too painful to set up.

There are three options I see:

  1. Create a new branch called 'preview'. This will be a long-lived release branch alongside 'main'. anytime we want to preview a PR then it would be merged into 'preview'. This means the auth0 and Vercel setup for the 'preview' branch are one-time and static.
    Pros: One-time set up
    Cons: can't easily preview any PR, would have to merge to the 'preview' branch first. Could result in issues related to merging multiple things and adds more branch management work.

  2. Create some hooks in Vercel that will update auth0 and vercel env variables on any new build.
    Pros: any branch is easily previewable without ugly branch management concerns
    Cons: up-front engineering work and a potentially long and ugly list of 'allowed callback urls' in auth0 which could be a pain to maintain properly.

  3. Set up a special read of the environment and if we're in a 'preview' deployment then authentication is skipped all together.
    Pros: probably simple to implement.
    Cons: we remove the ability to test authentication concerns on preview builds.

UI issues

  • when clicking on Tutorial the Docs link is set to 'active' as well

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.