# =====================================================================
#  Nexa Admin / uniThink platform
# =====================================================================

# ---------------------------------------------------------------------
#  Line endings
# ---------------------------------------------------------------------
# Normalise to LF in the repository. The team develops on Windows and
# deploys to Linux, and a CRLF that reaches a shell script or a .htaccess
# on the server fails in ways that look like a permissions problem.
* text=auto eol=lf

*.php    text eol=lf
*.sql    text eol=lf
*.md     text eol=lf
*.css    text eol=lf
*.js     text eol=lf
.htaccess text eol=lf

*.png    binary
*.jpg    binary
*.jpeg   binary
*.gif    binary
*.webp   binary
*.ico    binary
*.woff   binary
*.woff2  binary

# ---------------------------------------------------------------------
#  Deployment archive (Phase 9C)
# ---------------------------------------------------------------------
#
#   git archive --format=tar HEAD | gzip > release.tar.gz
#
# produces exactly the files that belong on the server. Everything marked
# `export-ignore` is excluded from that archive while staying in the
# repository, so "what gets deployed" is a property of the repo rather
# than a checklist someone has to remember.
#
# WHY EACH ONE IS EXCLUDED
#
#   tests/         Test code on a public server is attack surface with no
#                  upside. It also carries fixture credentials.
#   docs/          Internal decisions, schema notes, open questions.
#   deploy/        The preflight probe is uploaded deliberately and by
#                  hand, once, then deleted — never shipped by default.
#   .github/       CI configuration.
#
# NOT excluded, and deliberately so:
#
#   bin/           migrate.php and create-admin.php are needed on the
#                  server. They are CLI-only and refuse to run over HTTP.
#   database/      Migrations and seeds must be present to migrate.
#
# Both live above the document root, so neither is reachable over HTTP.

tests/          export-ignore
docs/           export-ignore
deploy/         export-ignore
.github/        export-ignore

/.gitattributes  export-ignore
/.gitignore      export-ignore
/.env.example    export-ignore
/package.json    export-ignore

# Reference material that must never reach a server. Most of it is
# already git-ignored; these lines make the archive safe even if a future
# change tracks any of it.
website-frontend/     export-ignore
_template-reference/  export-ignore
future-requirement/   export-ignore
*.sql.gz              export-ignore

# Test fixture directory — created and emptied by the suite, and the
# suite does not ship.
storage/test-uploads/  export-ignore

# These two require tests/bootstrap.php, and tests/ does not ship. A
# test runner that cannot run is worse than an absent one: someone will
# try it on the server and read the failure as a broken deployment.
bin/test.php       export-ignore
bin/benchmark.php  export-ignore

# Local MySQL provisioning: creates `nexa_admin` and its two users on a
# development machine. On cPanel the database and users are created
# through cPanel itself, so shipping this would offer a script that
# names the wrong database and would fail — or worse, succeed.
database/setup.sql  export-ignore
