[HN Gopher] Show HN: Kretes - Build full-stack applications in T...
       ___________________________________________________________________
        
       Show HN: Kretes - Build full-stack applications in TypeScript and
       PostgreSQL
        
       Author : zaiste
       Score  : 49 points
       Date   : 2020-06-11 16:36 UTC (6 hours ago)
        
 (HTM) web link (kretes.dev)
 (TXT) w3m dump (kretes.dev)
        
       | livre wrote:
       | This project looks very useful. Since you compare it to Django
       | and mention it has batteries included i have a few questions I'd
       | like to ask.
       | 
       | Does it include an autogenerated admin page like Django?
       | 
       | Does it handle database migrations?
       | 
       | You mention both Vue and React in your page, does that mean I
       | have to install either of them manually or does the cli handle
       | that?
       | 
       | What are the limitations of the query builder?
       | 
       | I can't test anything right now and the docs page looks a bit bad
       | on my phone. Also the examples page is broken and returns an
       | error.
        
         | zaiste wrote:
         | Thanks for the kind words!
         | 
         | 1. I'm working on the admin panel, but it's not yet ready. I'm
         | still hesitating how to approach the persistence layer without
         | introducing too many abstractions. Generally speaking, I'd like
         | to avoid ORMs as much as possible. :) 2. I use the node-pg-
         | migrate [1] for migrations at the moment, but I plan to tightly
         | integrate with Postgraphile / Hasura to give another approach
         | for that part. 3. You need to add them manually, but the
         | architecture is pretty close to Vite [2]. You have just one
         | Node process for both front-end & back-end: in development I
         | compile assets on the fly using ESBuild [4], in production I
         | bundle them using Rollup. I should probably describe that in
         | the docs more clearly :) In contrast to Vite, Kretes also
         | provide a REST API out-of-the-box, and a relatively simple path
         | for adding a GraphQL endpoint. 4. The current query builder -
         | sqorn [5] - has a nice syntax as it uses the same vocabulary as
         | SQL, but it's not typed. My goal is to create a fully typed
         | TypeScript query builder that's adapted _only_ for PostgreSQL.
         | Here 's the preliminary work for that [3] 5. I'm still working
         | on the docs. I'll fix the things you mentioned right away.
         | 
         | [1]: https://github.com/salsita/node-pg-migrate [2]:
         | https://github.com/vitejs/vite [3]:
         | https://github.com/typeofweb/functional-orm [4]:
         | https://github.com/evanw/esbuild [5]:
         | https://sqorn.org/docs/about.html
        
       | zaiste wrote:
       | Hey HN, author here. Kretes is a tool for building full-stack
       | applications in TypeScript and PostgreSQL with a goal to provide
       | an integrated, battery-included and open-source solution for web
       | development. It combines a web framework - similar to Rails,
       | Django or Laravel - with a UI being built on top of the VS Code
       | editor. It comes with a (eventually large) standard library of
       | built-in modules that are developed in a coherent way e.g.
       | authentication, authorization, admin panel [1] etc.
       | 
       | This project explores the ideas introduced by the Self
       | programming language and aims to bring them to the current age.
       | The ultimate goal is to create a semi-visual tool for building
       | web apps in a more intuitive way using just one programming
       | language - TypeScript - on the client & on the server, and
       | without the accidental complexity.
       | 
       | The project started as a way to arrange my knowledge around
       | JavaScript. Inspired by the past, I decided to replicate to some
       | extend what Sun Microsystems did in '95 with the Self programming
       | language (a project I find underrated and ahead of its time), but
       | using modern, popular tools such as JavaScript/TypeScript, VS
       | Code, WebAssembly, PostgreSQL, etc.
       | 
       | The project is in early alpha stage with the bus factor of
       | (strong) 1. :)
       | 
       | Happy to answer any questions here or at oh@zaiste.net*
       | 
       |  _PS. I'm creating a todo app using Kretes on YouTube [2] to
       | explain the bigger picture of building full-stack applications.
       | IMHO it's good to have a general understanding of how web
       | applications work_ before* specializing in front-end or back-end
       | - that's the goal for this video series, and for Kretes.
       | 
       | [1] not yet public
       | 
       | [2]
       | https://www.youtube.com/watch?v=rLAElFkRrWI&list=PLhXZp00uXB...
        
         | debaserab2 wrote:
         | > I decided to replicate to some extend what Sun Microsystems
         | did in '95 with the Self programming language
         | 
         | For those of us unaware of what the Self programming language
         | is/was, what things did you find inspiring that you are using
         | in this framework?
        
           | zaiste wrote:
           | I'd like to tightly combine a semi-visual programming editor,
           | the tooling and the runtime/infrastructure into one <<thing>>
           | as shown in this video [1]. You write a bit of code, you drag
           | and drop another bit, and almost instantly it becomes
           | <<online>> - the compilation / the deployment process are
           | somehow hidden and the configuration is minimal. It just
           | works, so you can focus on solving the actual business needs
           | of your application - but that's a long term vision... ;)
           | 
           | I must mention DarkLang [2] that seems to have a similar
           | goal, but a different approach: Kretes builds on top of VS
           | Code, and uses one of the most popular programming languages
           | while DarkLang builds not only their editor from scratch, but
           | they also introduced a new programming language. I find their
           | project ambitious and inspiring - a potential game changer
           | imho
           | 
           | [1]: https://www.youtube.com/watch?v=Ox5P7QyL774 [2]:
           | https://darklang.com/
        
       | nsonha wrote:
       | The choice of both Tailwind and Postgraphile makes me want to
       | throw up. The two things are on the top of my hyped techs list.
       | They're geared toward PERSONAL productivity at the expense of
       | maintainable styles and good API design, respectively.
       | 
       | Nestjs has been around or a while and support a ton of tranports
       | not just graphql btw.
        
       | tango12 wrote:
       | Congrats!
       | 
       | I see that Kretes uses Sqorn [1] for talking to the database.
       | 
       | I really like the looks of Sqorn, however iiuc, it doesn't
       | support typescript right?
       | 
       | How does that piece work?
       | 
       | [1] https://github.com/sqorn/sqorn
        
         | zaiste wrote:
         | Hello Tanmai :) Yes, exactly. It's not typed and also not
         | actively maintained. The goal is to have a fully typed query
         | builder that's adapted only to PostgreSQL. Here's the
         | preliminary work for that [1]. I would also like to find a way
         | to fully integrate with Hasura
         | 
         | [1]: https://github.com/typeofweb/functional-orm
        
           | tango12 wrote:
           | Hey Zaiste! I missed your name as OP :)
           | 
           | That looks like a really good start. Do you think it'll end
           | up looking like JOOQ? Would be interesting to see how you get
           | things like aggregations and perhaps even things like:
           | `SELECT 1, 'hello'` to work. That would be the ultimate test!
           | 
           | Happy to help with any Hasura integrations whenever you're
           | ready too! Let's chat again soon. :)
        
       | MH15 wrote:
       | I'd be interested in contributing to this project. I'm going to
       | poke around the codebase and see if there's anything I'd be able
       | to help with. Reply if you have anything in mind!
        
         | zaiste wrote:
         | Wow! That would be awesome. I'd like to finish with the on-the-
         | fly compilation that uses ESBuild. This approach is similar to
         | Vite and Snowpack. I wanted to integrate it with React/Preact
         | and Solid.js in the next few weeks. Any help with that would be
         | appreciated.
         | 
         | I also plan to rewrite the core to Deno. It will be relatively
         | simple, but a bit mundane. ;)
        
       | gitgud wrote:
       | Why does this depend on both Reactjs and Vuejs aren't they
       | essentially the same thing?
        
       ___________________________________________________________________
       (page generated 2020-06-11 23:00 UTC)