Skip to content

DzzD/appcorejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppCoreJS logo

AppCoreJS Framework

AppCoreJS is a lightweight JavaScript framework and application generator focused on layered overrides, code factorization, and interoperability with standard web and Node.js code.

It generates a working application out of the box, from backend/script projects to full server + frontend applications. The generated structure is designed to be extended, specialized, or overridden instead of rewritten from scratch.

Its architecture separates the framework core, the global application layer, and the project-specific layer. The app layer can override core classes and global behavior once, while each project can still specialize or extend what it needs locally. This makes it possible to factorize most of the code, keep projects small, and adapt the framework deeply without modifying its core.

AppCoreJS also provides a complete ORM layer that can be generated and regenerated from multiple databases and multiple schemas without losing project-specific specializations.

Generated model classes can be extended through the same layered override approach, so database changes can be reflected safely while keeping custom business logic and rules intact.

The query system also supports advanced queries mixing multiple model objects, making it possible to build rich aggregated results, joins, search screens, detail views, and domain-specific data structures without duplicating low-level SQL logic everywhere.

The frontend is built entirely with standard HTML5, CSS3, and ES6 JavaScript. AppCoreJS components can be mixed naturally with regular Node.js, HTML, CSS, and vanilla JavaScript code, so projects are not locked into a rigid framework-only approach.

Because AppCoreJS stays deliberately lightweight, generated applications remain simple, fast to load, and fluid in use.

The rule is strict:

project -> app -> core

core is internal.
app is the mandatory interface.
Project code uses app, never core directly.


Quick Start

Minimal full command (all layers):

npx app-core --back --server --front --model --project myProject --dbuser appcore --dbpassword appcore --dbname appcore

Generated structure (current directory):

./core/
./app/
./myProject/
./myProject/public/
./server.js
./index.js

Run the server:

node server.js

Open:

  • http://127.0.0.1:3000

Global Concept

core

  • internal engine
  • framework internals
  • not intended to be used directly

app

  • framework interface
  • mandatory entry point
  • place to adapt framework behavior globally

project (./<project>/)

  • business code
  • business models, queries, server components, frontend components (optional screen split)
  • uses app only

Fundamental rule:

project -> app -> core

Never:

project -> core

AppCore<sub>JS</sub> Architecture


Why app is mandatory

app is your control layer. You can change framework behavior without patching core.

Example: global save rule in app/db/DbObject.js.

import { CoreDbObject } from '../../core/db/CoreDbObject.js';

export class DbObject extends CoreDbObject
{
    async save(forceInsert = false)
    {
        if ('updatedAt' in this)
        {
            this.updatedAt = new Date();
        }

        return await super.save(forceInsert);
    }
}

This check is functional. It applies only when the model has updatedAt.


Project Vision

./core/
./app/
./myProject/
  db/
  server/
  public/
  • core/: framework internals.
  • app/: framework interface layer.
  • myProject/: business layer.

Domain Overview

Backend

  • ORM classes are exposed through app/db/*.
  • project models are in ./<project>/db/models/.

Server

  • server base class is app/server/Server.js.
  • project server extends it in ./<project>/server/.

Frontend

  • frontend root is ./<project>/public/.
  • public/core: frontend engine.
  • public/app: frontend interface.
  • public/components: recommended project frontend folder.
  • public/screens: optional project structure when a screen split is needed.
  • public/ext: generated only with --front --ext (or --front --intro).
  • public/intro: generated only with --front --intro.

Models

  • generated with --model.
  • project model classes generated in ./<project>/db/models/.
  • core base model classes generated in ./core/db/models/.
  • never generated in ./app/db/models/.

Documentation

Start here:

Direct access:


Author

Bruno Augier (aka DzzD)

About

AppCoreJS is a framework for building Node.js / PostgreSQL / HTML5 / CSS / JavaScript applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors