From the command palette, select
Kretes: New Project. Set the project name and select a directory in which the project should be created. A new editor window will be created with the project scaffold.
A Kretes application scaffold can be also generated from the command line using
kretes new my-project. By default, the
newcommand will also install the project dependencies. You can skip that using the
The application directory has a number of auto-generated files and folders that make up the structure of a Kretes application. Here's a quick rundown on the function of each of the files and folders that Kretes generates by default:
|the application config|
|the client-side config mostly for setting up UI libraries & frameworks (React, Vue.js, etc) + TypeScript config|
|the server-side config: the routes declaration + TypeScript config|
|the database config, the deployment endpoints and everything else as YAML|
|Kretes organizes files by-feature, it's like a namespace|
|npm dependencies needed for your Kretes application|
A Kretes application requires a database. You probably wouldn't need a web framework if you wanted to create a web application without a database. Kretes supports only PostgreSQL as it heavily uses its unique features to help create performant web applications faster.
Kretes will launch the PostgreSQL process and create a database automatically behind the sceens once you start the application. This is managed using the Nix package manager so that you don't have to worry, which PostgreSQL version to use or how to connect to the process to create a database.
The generator sets the database name to the application name. You can change that setting in