Files
Martinhal_Contact_Site/Martinhal_Contact_Site.7z
T

1746 lines
75 KiB
Plaintext
Raw Normal View History

2026-09-13 20:18:51 +01:00
7z¼¯'åEq+$\n6&node_modules
npm-debug.log
.git
.gitignore
README.md
.env
.DS_Store
backup_*.json[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://git.praksis.tech/jpmvaz/Martinhal_Contact_Site.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
merge = refs/heads/main
Unnamed repository; edit this file 'description' to name the repository.
ref: refs/heads/main
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Open2;
# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 2) and last update token
# formatted as a string and outputs to stdout a new update token and
# all files that have been modified since the update token. Paths must
# be relative to the root of the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $last_update_token) = @ARGV;
# Uncomment for debugging
# print STDERR "$0 $version $last_update_token\n";
# Check the hook interface version
if ($version ne 2) {
die "Unsupported query-fsmonitor hook version '$version'.\n" .
"Falling back to scanning...\n";
}
my $git_work_tree = get_working_dir();
my $retry = 1;
my $json_pkg;
eval {
require JSON::XS;
$json_pkg = "JSON::XS";
1;
} or do {
require JSON::PP;
$json_pkg = "JSON::PP";
};
launch_watchman();
sub launch_watchman {
my $o = watchman_query();
if (is_work_tree_watched($o)) {
output_result($o->{clock}, @{$o->{files}});
}
}
sub output_result {
my ($clockid, @files) = @_;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# binmode $fh, ":utf8";
# print $fh "$clockid\n@files\n";
# close $fh;
binmode STDOUT, ":utf8";
print $clockid;
print "\0";
local $, = "\0";
print @files;
}
sub watchman_clock {
my $response = qx/watchman clock "$git_work_tree"/;
die "Failed to get clock id on '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
return $json_pkg->new->utf8->decode($response);
}
sub watchman_query {
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
or die "open2() failed: $!\n" .
"Falling back to scanning...\n";
# In the query expression below we're asking for names of files that
# changed since $last_update_token but not from the .git folder.
#
# To accomplish this, we're using the "since" generator to use the
# recency index to select candidate nodes and "fields" to limit the
# output to file names only. Then we're using the "expression" term to
# further constrain the results.
my $last_update_line = "";
if (substr($last_update_token, 0, 1) eq "c") {
$last_update_token = "\"$last_update_token\"";
$last_update_line = qq[\n"since": $last_update_token,];
}
my $query = <<" END";
["query", "$git_work_tree", {$last_update_line
"fields": ["name"],
"expression": ["not", ["dirname", ".git"]]
}]
END
# Uncomment for debugging the watchman query
# open (my $fh, ">", ".git/watchman-query.json");
# print $fh $query;
# close $fh;
print CHLD_IN $query;
close CHLD_IN;
my $response = do {local $/; <CHLD_OUT>};
# Uncomment for debugging the watch response
# open ($fh, ">", ".git/watchman-response.json");
# print $fh $response;
# close $fh;
die "Watchman: command returned no output.\n" .
"Falling back to scanning...\n" if $response eq "";
die "Watchman: command returned invalid output: $response\n" .
"Falling back to scanning...\n" unless $response =~ /^\{/;
return $json_pkg->new->utf8->decode($response);
}
sub is_work_tree_watched {
my ($output) = @_;
my $error = $output->{error};
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
$retry--;
my $response = qx/watchman watch "$git_work_tree"/;
die "Failed to make watchman watch '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
$output = $json_pkg->new->utf8->decode($response);
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# close $fh;
# Watchman will always return all files on the first query so
# return the fast "everything is dirty" flag to git and do the
# Watchman query just to get it over with now so we won't pay
# the cost in git to look up each individual file.
my $o = watchman_clock();
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
output_result($o->{clock}, ("/"));
$last_update_token = $o->{clock};
eval { launch_watchman() };
return 0;
}
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
return 1;
}
sub get_working_dir {
my $working_dir;
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
$working_dir = Win32::GetCwd();
$working_dir =~ tr/\\/\//;
} else {
require Cwd;
$working_dir = Cwd::cwd();
}
return $working_dir;
}
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff-index --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git merge" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message to
# stderr if it wants to stop the merge commit.
#
# To enable this hook, rename this file to "pre-merge-commit".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit"
:
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
while read local_ref local_oid remote_ref remote_oid
do
if test "$local_oid" = "$zero"
then
# Handle delete
:
else
if test "$remote_oid" = "$zero"
then
# New branch, examine all commits
range="$local_oid"
else
# Update to existing branch, examine new commits
range="$remote_oid..$local_oid"
fi
# Check for WIP commit
commit=$(git rev-list -n 1 --grep '^WIP' "$range")
if test -n "$commit"
then
echo >&2 "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up to date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
else
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/\n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/\n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]\n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / \ /
/ / / b---b C \ /
/ / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
echoback=*)
echo "echo from the pre-receive-hook: ${value#*=}" >&2
;;
reject)
exit 1
esac
i=$((i + 1))
done
fi
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi
#!/bin/sh
# An example hook script to update a checked-out tree on a git push.
#
# This hook is invoked by git-receive-pack(1) when it reacts to git
# push and updates reference(s) in its repository, and when the push
# tries to update the branch that is currently checked out and the
# receive.denyCurrentBranch configuration variable is set to
# updateInstead.
#
# By default, such a push is refused if the working tree and the index
# of the remote repository has any difference from the currently
# checked out commit; when both the working tree and the index match
# the current commit, they are updated to match the newly pushed tip
# of the branch. This hook is to be used to override the default
# behaviour; however the code below reimplements the default behaviour
# as a starting point for convenient modification.
#
# The hook receives the commit with which the tip of the current
# branch is going to be updated:
commit=$1
# It can exit with a non-zero status to refuse the push (when it does
# so, it must not modify the index or the working tree).
die () {
echo >&2 "$*"
exit 1
}
# Or it can make any necessary changes to the working tree and to the
# index to bring them to the desired state when the tip of the current
# branch is updated to the new commit, and exit with a zero status.
#
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
# in order to emulate git fetch that is run in the reverse direction
# with git push, as the two-tree form of git read-tree -u -m is
# essentially the same as git switch or git checkout that switches
# branches while keeping the local changes in the working tree that do
# not interfere with the difference between the branches.
# The below is a more-or-less exact translation to shell of the C code
# for the default behaviour for git's push-to-checkout hook defined in
# the push_to_deploy() function in builtin/receive-pack.c.
#
# Note that the hook will be executed from the repository directory,
# not from the working tree, so if you want to perform operations on
# the working tree, you will have to adapt your code accordingly, e.g.
# by adding "cd .." or using relative paths.
if ! git update-index -q --ignore-submodules --refresh
then
die "Up-to-date check failed"
fi
if ! git diff-files --quiet --ignore-submodules --
then
die "Working directory has unstaged changes"
fi
# This is a rough translation of:
#
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
if git cat-file -e HEAD 2>/dev/null
then
head=HEAD
else
head=$(git hash-object -t tree --stdin </dev/null)
fi
if ! git diff-index --quiet --cached --ignore-submodules $head --
then
die "Working directory has staged changes"
fi
if ! git read-tree -u -m "$commit"
then
die "Could not update working tree to new HEAD"
fi
#!/bin/sh
# An example hook script to validate a patch (and/or patch series) before
# sending it via email.
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to prevent the email(s) from being sent.
#
# To enable this hook, rename this file to "sendemail-validate".
#
# By default, it will only check that the patch(es) can be applied on top of
# the default upstream branch without conflicts in a secondary worktree. After
# validation (successful or not) of the last patch of a series, the worktree
# will be deleted.
#
# The following config variables can be set to change the default remote and
# remote ref that are used to apply the patches against:
#
# sendemail.validateRemote (default: origin)
# sendemail.validateRemoteRef (default: HEAD)
#
# Replace the TODO placeholders with appropriate checks according to your
# needs.
validate_cover_letter () {
file="$1"
# TODO: Replace with appropriate checks (e.g. spell checking).
true
}
validate_patch () {
file="$1"
# Ensure that the patch applies without conflicts.
git am -3 "$file" || return
# TODO: Replace with appropriate checks for this patch
# (e.g. checkpatch.pl).
true
}
validate_series () {
# TODO: Replace with appropriate checks for the whole series
# (e.g. quick build, coding style checks, etc.).
true
}
# main -------------------------------------------------------------------------
if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
then
remote=$(git config --default origin --get sendemail.validateRemote) &&
ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&
worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&
git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&
git config --replace-all sendemail.validateWorktree "$worktree"
else
worktree=$(git config --get sendemail.validateWorktree)
fi || {
echo "sendemail-validate: error: failed to prepare worktree" >&2
exit 1
}
unset GIT_DIR GIT_WORK_TREE
cd "$worktree" &&
if grep -q "^diff --git " "$1"
then
validate_patch "$1"
else
validate_cover_letter "$1"
fi &&
if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"
then
git config --unset-all sendemail.validateWorktree &&
trap 'git worktree remove -ff "$worktree"' EXIT &&
validate_series
fi
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --type=bool hooks.allowunannotated)
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
echo "*** Creating a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
# delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0
DIRCi˜ÊµÐAi˜ÊµÐA¤X].Zµ5.B¤
À˜ÀŒ9Æ
ºpa
.dockerignorei˜ÊµÐAi˜Êµ×åP¤1V¹Ëc;š)ÒïÝ*êåì±5T Readme.mdi˜Êµ×åPi˜Êµ×åP¤ÎÖÐ~ßlsFwœWœq!‰¹scredentials.jsoni˜Êµ×åPi˜Êµ×åP¤"lþæÒÍZÞÎÑîÁ.׿ú¡<bdocker-compose.ymli˜Êµ×åPi˜Êµß…D¤u˹/Ú*Ð S\iÁC+÷¶
dockerfilei˜Êµç$Ôi˜Êµç$Ô¤dPkÑ^“ÇÈ™;ÅÕ£ÿCØ»
index.htmli˜ÊµîƼi˜ÊµîƼ¤
bH¥¥ ‚‚‹² ž‡´g%Gò7ÿ2 package.jsoni˜Êµöh@i˜Êµöh@¤!ÊV‹6µ×¬êCúŸÊpÊoœ÷: server.jsTREE8 0
ÿä@æ£m/+­ûiŸõQ…
øÐèM†?ÄNP™_‡@h^ÁíßÊ_)# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
0000000000000000000000000000000000000000 7a0aa9e8697b8f129a16d206f815d3dff990513a jpmvaz <jpmvaz@me.com> 1771621045 +0000 clone: from https://git.praksis.tech/jpmvaz/Martinhal_Contact_Site.git
0000000000000000000000000000000000000000 7a0aa9e8697b8f129a16d206f815d3dff990513a jpmvaz <jpmvaz@me.com> 1771621045 +0000 clone: from https://git.praksis.tech/jpmvaz/Martinhal_Contact_Site.git
0000000000000000000000000000000000000000 7a0aa9e8697b8f129a16d206f815d3dff990513a jpmvaz <jpmvaz@me.com> 1771621045 +0000 clone: from https://git.praksis.tech/jpmvaz/Martinhal_Contact_Site.git
ÿtOc
~ªT¨¢å§/Dq•JÈ
séGËV¹Ëc;š)ÒïÝ*êåì±5TÊV‹6µ×¬êCúŸÊpÊoœ÷:"z·¾õ6° ·Wþ@™¯~¢*=Owª¬A€U݆èô1|ŸiÏóÓPkÑ^“ÇÈ™;ÅÕ£ÿCØ»
tñ].Zµ5.B¤
À˜ÀŒ9Æ
ºpaa1Q÷H~dƒÈovð¼&²FbH¥¥ ‚‚‹² ž‡´g%Gò7ÿ2lþæÒÍZÞÎÑîÁ.׿ú¡<bz
©èi{šÒøÓßùQ:°{y¨+š/ò‘ïÙ¿§%»49˹/Ú*Ð S\iÁC+÷¶ÖÐ~ßlsFwœWœq!‰¹sÿä@æ£m/+­ûiŸõQ…
øÐÅŸÇÊš’í…ÃG|âÜ€T¨‡,_ª©ñ½)߬ _
Æ1mPe½ƒ¶ô™Mãˆ-O‡ÈáñɆ\Im ƒ',6¡¿µ&[
_ ;
É ¹Þ’ÿ¥£^À‡²ÝYt­¶Í’¹µ”{1= å„ZÇ–ºFÎR–*xJ«PACK
K
1÷9EïIOþ ƒg<@Oºâ !ºðôxߦ ¨7º¨Š÷V"¹È“N ±.±µ‹†€9XÒÌÖlÔå9À±×”ˆ¨zÌ6æ%«w˜jÑXªªc‡jè5nk‡ÇÖÞôÓç&Ǻ¶0%ôS )ÃÁî3»m÷1äÿ‡¹nLCà"Ä{ÔØ|î>û”
A
Â0E÷9ÅàVÐd’fñ ÓÎ`¥5¥FžÞ‚ðoïÁo«Dç]çÛ¨$1$ß§M£Ú¤Ücd Ñ,e•G¶Ä6P. 9P³2k!GØ1ûà³)¯v«+Ü—ù]>púñ2Ë¡¯óöv›Ùê<¶&ÿ?Ìu™j@ÇIžÐ*ìŽ;ónˆ=’”
A
ƒ0ïyÅâUh7«v é'|ÀÆn¨Å±k}}?à\ÆVU b‰5uÍ-¢/8Fî8i!”Ä*Dâd³WYá½ä¯üà~ø‘õ2–܃göÄÔ6 5æÉLÏnXæ"OHÓ¬°Õµr+®1¨xœ340031QÐKÉOÎN-ÊLÏË/JeˆÕ‹Újªç´„ëÀŒõ=–Çxw$B•&—dæçë•T”0pÔ­
Y±èér}—©^'x_ºË†ªM.JMIÍ+ÉLÌ)ÖË*ÎÏc¸Ö{¡Žá~N±[ùð9…Š;ù‹¡j!öë&ççä§êUææ0äü{vélÿ½sßÔ»þì—ìB›$Õi™9© §wêßÒºÀÌ“ÉQ³Wà ³ö÷mPU™y)©z%@³²/ÆM>~b¦õÑ«ý‹ÿ;ߨÍ[òªª 19;1=âÂ$¥K9›šº7)Ìkß’®êþÉü¿T]qjQYjPƒÄ©°n3ö­××¼rþ5ÿTÁ©ü9ß­©ý…¿è)xœ(×ÿÈÁ0Readme.mdV¹Ëc;š)ÒïÝ*êåì±5T‘Uó>jϸxœËËOIÏÍO)ÍI-æåÊ+ÈÕMIM*M×ËÉOçåÒKÏ,™éyùE©¼\A®Ž.¾®z¹)@áÔ¼2 é\–KJLÎ.-ˆ×ÒË*ÎÏ3±óxœµWÍn7¾ Ð;Lâƒm!’œØnz°-'N8®å$h/½Kiï’[+Y=õЊE€øÖí©×úFy>BgÈý“¥&Š>DäÌpøñ›of×à)ÓVȘ%p¨¤e¡ÅÉ&<åÒÂpn,O¡ ^r
Cnó¬Ýj·ÖÖàïßÞüU®?‘Ʋ$aV( g<T)úG<ÚôÆkpª¹æßæÂËM»UEÞ“GÄÖf&è÷#š^ä¶{¨?á¶ëöއ*Í”áuØÈMŽÿ›:q3aãÒxÀÍ¥UY•ÍW¹/ahñîM;ھ߃Nç)»ä`rÍa®rˆÙ”F†±H0°`cÜf)‡HhZ¥çA§ÓnF£v+-í†Pƒi¿¿~÷þú{ü+N¢HÍU?ôp—êÍÓ¤¹[ !&Ré7_õb»hjáë –˜Þk£dsÏp=E\_›æbÆÂK|òÊøº T\àUÄ,s»°1ħC˜EÔYnUŠô›íÖ‚ñ Œƒš`s1…äºDì‚™¸ÝZò ºQl›‚í‡!7ÆÅ`Y–àÄ6åYÆ%½”† ­fxEwæDUŒˆWH«Daб26ØÛÚÚrqw(2ê¿å©™¬RÛ¥/ŸA¢&æƒ~dÝqåJD¬ÉœbÊÎøëD†œ ¶Û&·Ü½]§sÆÍ'ç ½O#Ê'Ë´Ð…gÕØ"p¡ŠR1“þáØþZ7BX¯".˜˜'ɪӀ_ñºÂ®¸Yõò¨žoÿ€œrmÊlñè#¦*ÉIŸ,eHU!dÞܤ…Îr‰v:¨×_“}±çü0M Å
XöXÁ9é"Å¢ßyfú. T6+
ey4ÅŠc'O¸å®äÐÅÉB
–¹×È]ó
6æw* ®€çî 9q4Û¯iV²Û.@ð¼Q+ß½ZÓî·aoÓ©OÅ—–#dð?ÐÃßà
æZSÇ<eÆÌ”ŽJê#P`/¬v:Ô¤oØ~wâ½ËÏî>ÜËŽ»ÇÛ#ïq@Ï‚Ïñ^›Œs`Q*ä
ƒ…ˆs»½}?|9Ù|¶ûÝÎðÑ`üY⯿ùVù+EX{rŸ*,nDlpøtÑœÚ[n¸£÷Q„T-÷¦‘CÕ—{²Œ¢¤¨×£<gÔ“h˜
H¨»ÛxŠÓÞ»kPTÕT0Xh²làaUy3%×­o&WÈHª°«s$ÎÜÆD½ºM‘/ñ­ÕŒ’2K]v¼ýöKÏkÅ”4ráèâÇ+Ø8QE_póÊ“¢ÊÜÕg 9f½Pa”­dhy÷ƒrƒ”F×ç˜l¢X„÷Ri=fIÜmzJOú !Ô!<£)N†‚›2K˱k¡™9÷í ˜«†®*o¸-6†Êi'×Ã|û. V6îE ù'Kå¡›<1ßDÍir%ƒG¨[Y½U›Í‘/¨f>,7TÛ©ÀzuFS¦£zqhPˆ=S2↛pðÅè}ÏÏO‡>¬&Ja(<ùjr"äÕ&Ù»!©<RôBŠQ Ù%2&2Å.D&TX7s.—!y`^±4KøÂU—LEIùQ ‡õíÞÞz»Eò)°].[/†ôü¯Jß_‘B+kìj ({•øÅ¢Ï5LzýåžôQ[V¬7½
½iñÃï—ò7cób±ñÔÃOž
Ž^¼ø¢FÓozöT–åûÔ‰CñT„)Ë
â¼ÕÛ]o.§(>øÉ»÷<mòùý»á€K>¦'WãÆWI×í9þøaÁ6/àöK¥/Mýeâ”msú`(½˜™7êÀ¹=“Ô­ÝøIÂRhéñĨ„HêGÅ
À†¦iNõŒWx¦¦áÐÜ8)wmÛ8ßí¸¶4šƒêÆ
ÂO 7¢Weƒ¶_æÆâ-²¹»¿çÁv3»ŽÕcïøp·ùØÅÓ¤šª¹¤¶€•çŸáÉÍOÿÜ·ÿxíW‹xœ¥SËkIg&™Gj"¾ð‘É7Ø2:=3N†„– `d ‹ñ/b:=•L›îª¶º:ã q÷ìA
åMaÁÝÓ²îuñ Â²à¿ ˆ(Þ=yÅêÇ$­àlš¢û÷½~õû¾ïŸÒ»=·Æhm¢º¡J¥§fø²gº&ÇîZoríÁ‘Rh9í™Æ2Ìqq虼 ÓÔXÆ ‰Í‰Ã54??li2IW·j%\7¸[G/oß}yûWùF…Åjb´³¨Àd.Êp 7I_Q»Ü¶ÄÓÄî1‹‹Ù
fê%7†9º±¬/a R"¶$§R'q>¹/ë-ènW<ÚÁ÷“câ¿d;Äûäèá
™Hþ¶C] Ú#?j«P­ž3q,ºäjÕêzÎÕáQΫC%™ïîÐîO
¦Ã"1´³üÍ:¢4üe6 »¾úa¾/²©Flþ†æWë}†-x¦Õ‰)TNíÙ¸ÇO©}ca]9 o~À´Îu8…™kº#±–ªŠ‡©ŸE6}PÊ0‘ž–çµtYž÷Ò­tH…38( .£ýÅ£™]2û…LSÜÌ€xiìŠøÝùÎ2ê-XØíR*‡r ‰™’ÍNlòCûºm!‡2îjb1;¾ é1nMô(Q8„còþŸU¢Úo³Jë;¸ƒÛ—úØà0`¨é1ö—GÔ#Í,BŸz2į×Ó NÁ“IÂ}ÑÂå›ãئ3DR²,˜¥ÒÅ«‘ŠT`•gֹǖ›¸
:Å·´h}ç‚õù$bc²Ä*ÚöºË¹£Õë5t«K]®M6Ðç_äú3¤È3•Z®..å*âF®)'9¥¼.óŠ?#”h ´ÔIù«kX
_Ìo/ OÐV
TÑÊ+$lMð Pƒ½~á úÞ[¡–gû)®çÛâQ~L¼Èoý%°`²b2JlLøFøìÉéãÏž›ríx—l[;íüä@RùÌ"À2m“Çþ ÇsåMj[‰¡6¶iõ5h7º^ðGóÏ”x]hŠÅ q²X«Åºø«¨JËóâÜGiAÀ«¾ xœ«æåRPP*NÌ)Q²RPòÍ0/²Ìs³(1)4VÒ+H+ÊÏ+IÍK
‹‹Ëó‹@BJnå9Fî.a¡!.ùNN®NA¹¾NnƩΎ®J õµc’“³QM)-N-ÊKÌM™âãX‘èba ±Í
?§r×Àr·p_÷’RçÀ}Ïp7ÿÀôCç@¼\µˆ7˜ïrxœÛ(·ˆI ,µ¨83?ÏJAÝXÏB—k2ÏD“äü¼’Ää’bݔĒD+ýÄ‚}‹—KŠR‹K‹J¬JórR‹‹u‹Kò
RS&á1”áå*ËÏ)ÍM-¶©E5ÏX$µxœMPËNÃ0¼GÊ?¬Â•&áVqMƒT¡6U*q0ÎÒºq약@û÷8h®3³ó؇ºÚ€±
Þß-B“2Gqt{dø±®Uær(ÙºK=Wõãj]C&ˆFaaé$d+ŸJ££¢Ú½þaéÉ[i6ª×ƳÐ$4
©z}ý´C¨‘­¤`<ææ*ŸÓ#wz°0é08²Ú_CÆ£ûFÀÿ…CÁ¡ãùù¾K×4ÌÌ&ÑxXžÉz²Žã¨|ÙUû–yžO_cáøˆSdÈ߬à- ã’[H|O'ï¿ëpqí·Á xœÕ=]ÛHrïü8Âe(%êc><+Ç;kÏ"ÞxíÉ}¹ÃÜdM­=I”5s²€<ä)‡$@€}¹<ää9?åþ@ö'¤ªº›l~I{öÖv‡Íf±ºªºº¾º)n=}ùäÕoOO´I2õŽîß;Ä«æYþ¥Ù`~ƒz˜åàuÊK³'V³Äl¼~õuç ‘öûÖ”™w.›‡A”44;ðæÜÜu’‰é°w®Í:tÓÖ\ßM\ËëĶå1³oôOâ&;úÖŠןXžöPXv‰íÈ
-Žl³1I’0v»3?¼º4ì`ÚÙ?èΦ¿1Â(pfvâ¾1u}ãmÜ8:ìr,âë8Á4‡;>ï—#kļnœX¾cyϺԱ1&ÛñÄr½¹ë;v^z  ^0sÆž1¢Äzk]w=ww߯¡3îŒ=£ÏÛ0|ŠÖ"ïX³$H¬‘Ǻ;0ÌŽ'ôf—0Lúô®½öâënÏè{Ô6Æ3¯ZÆ]©á£À¹Á«ã¾Ó\ÇlDA (Ü+D$7!¨z®>o¨¼ îq²˜Åì,±Ö†ÆÉxÌìdiþ
u摀ИoG7aòÔJ,31FI`5“VúØa¹Ç‹$ºYD,™E¾f%Á@—¶•ØÙéKËeúúuÌfܾjפ×ãÖ#%Zdêú£q5ñÆ5{ÜCÇð˜™L¹´¢æY¹þ¥1Ž‚éXñO‡5ÃÍã¤é¶þþ*wÿWWE«õHP!e÷ïg>­í8 ­… ömELɯázaJÑ5uÓOôT&çŽ]!ÜS¸*pcË‹Ye cÒp(Ðç
Br¸§Ø¨ò›`žÃµ$fVdOèŒZ*
ýc×KXxòky£{^ iË^À»ú7`éÇp­—ÐÌž®˜ƒ¯E»šfátNÐ_‹v
ƒÐR¸Ö€„Ñj±D¢
|±Ì€˜nÿD°ÞTq)äA¥OD{%°˜ŸÞ¬õÙ\¢}Á›5  @ù‚ZuÊDS1\U®Ñu½=O‰×pnÓ`äzÔbSpØ}Ÿ9ow0±®¶xx~¯%ô.UŶ®Ï©µbIEÌáë /µsÍ& ¬SS7ºø2P^>{øzëþ=#™0¿ ;nnEFpÕJ&Q0×@XÚIEÒ_‰6f¾£gf„4[Ë…CcIÊš“2ÔL¢YÆ…633«&ldÞûŽ
‡Bn;FlyŠ «áC+ŽçAä(ðR[›‹óÙÅp!!†Šo†­%É¥NxCŒo2a¢ð{Œ$¤CP%M$¢á› éš"P½E8—mn$år ÓŠo|[Lz ™ÖÜrA¾|’ºVèvxô¦„f$…v´?çXÚVô¢ùþ=§CZTx”©$>ÕŸ½ÒÛú±mü⪅›¯+ràú×c!ïþÖr1l´|›éé¬Úˆ2ÕkD˜‰/#Faô®ì{îÆ#Ð8µëog€ØÊuY—‹ù0KøOLH«4øPsl½c5b®oA< œ¡~úò „qÿ ;Ã…þ„GÊWVèCÝ
CÏå¬viá,“á7g/_19fw|Ó\¤.O‘ö;·Ì C}㳞ÇÒŠ½à&c{[(ý‘ÙCm‘òhJA¶ÏUÊ85qNSí ³¯È«˜¡d‹ÌMK¬y2Eð†¸
MS]j‹Ê­MÞ/×§:iN@Ã= Ô43Î2BšÒáµZ ÅA
c¢8A4ßÀ%úb¡>óßYžëh½ê…<5EBÈÿ‘¼hñ%TŸ¦Ì¶@$àV‰Ztü¥y"µ9;d©0hÎ4?³Àyªg!*Â)º³ÉÚnŒÎ’sÀÆ&ƒ¼$ºd‰A ‹Ï{ܰŒ[Š
BcQ
û­Ò0<>)™ï(2dÞ¾¹0 CܵE¬á™—z+™,y×
À% Ùœs£€_ÿê9Ð(ÔWáØraï8YÈ
 4ÐqloS“¼0MBjÏaät¤d¸Î†b†ÌÁ•]p!BïÜ×+Á, ÄrL¨¤¦+zj…MÛ<²
H{LSÈn‹æÐnÅr&(Ȇq˜'Çp.(x0v=ý)ƒ4ƒib¨Çz«UI{%[& j)#ÀT sIçAbÛÛ[dc ×·½™Ãbù€/cîpB¸%¹ôEGk%7xu¸…aЈåFn>9(ƒrþ$Ú…ø”3'„%ÃÕímÙÀS… Î&샓Kè¡Ã§§vbi9تúØŠ“.bSŸ-[0
J]œzΊ,Ç
M4^HV$J$Ì3<elx8ô6c$Ó|; êqªLàŒ”Õ—æ£ ºo„êþbá,¿i•&C¨ìµyt
,~ô8u½,ú•(f¯ŽH/%2“ržÄnUJ]ZÛ¸ÆÒßožŸI.ãÈósýØ8ˆ¾^ƒ‰ƒË)Z8 ÆÈÀAãí\Ÿ¦¼ÃÍs9´~qÁ… ,EXÆÁàûgñ¤yn“InÛÚP¸ …+· Ð ÚV…ÛVy{¸~Sokz뢕¥ó‘ ÜüƘ%.d1£ ¸úVwSˆU+°¾K‚ïâ c ÏIæñ¹¾eài/ÌóÅÜž ½e›ý=Ù8(6vJ0»½%J H „Šà1Å€óQ{·rn-ùÂ<rAÞÈçßýbŽ]R³e$Á³³—¼æw1D `_é-ðàK‹goŠŸìÓ§_ç&{ñ6†®¥‰•É`nP/Ó_P^“`š:Î÷t
¬]J@à±A>ÑOÎÜß³fÿ@öb©­©— Ãz»¿ÛîïU¾Ü˽üæ„ÈeÎP+ðJæaüÊ$ûË7ˆv0Pªrfq¡Ü©Â B±ú
 ÍO†w°ndîà@#†Ø,ùípp@íІ‹±Øð m3Ï;ï‡Þ~°)Ê™„s=ðð^
Ïû½A»?Øovv/ ô{6õ%`o¸@D‡…þá(p_íº¾SìØU;ö c¯ˆc_íÐQrúr)’RÈIš¢ë ¯%UM¦èô›†à(˜7LÏïßûè¹j#Žo‚‰¯=
D>{ÅDºü`g¯¯õ;ÚîÞ¾öðà ÙõÅÁCmoWÛô¡ë-¼l8û’][@*Ä¡›²ïrÆ,´MÝd@_»<õ.øE¯<à„—_. ™Ëõ‹‰y[+åå÷ï]ÜÙ…Ùø™,¯TË›‰á»T/å+dbõ¢Þ¹S´YFNO®AÛM¦¦Z€µ.ÛÚÂ[H§2(ÛªL¾¨)20“½KJu#Rq|ó5LÖÁqY7M€“£óÄJ™ž ºB)ñIBô4-ínœÀjÅ÷•ФFR4å[ÆÞÆçù{\[Èa¦%QW‚Š@Õ*ºk/x•eØç58&eʳ':¨Óm¶#Òä"~uSd¡ lâÃsWÊ÷况{ÑBoáú3–Ò
²“馶j&øÀ…eH Ä¢cyˆrAìéËžb×@v‰üûvdÏ9!¢K‰8±Oögavï_<æiÛz+
¨
0—Óf«%ƒ@ìËåCYbJdRÊUYÆ
nœÄ™CtÀ=¢–¼ðœEO¬ì3™¸ªD±r‹cm-òeÉ0bïÀ?C‹­v†Šü¬œþ‰Ò¼ÎU€wѼòæC⊆-a[¿óŸM³(B¢ZÊÌ6þvå‚ap´¦3ãE<·°|£Öà¢IÏ•zq©`©ׯ¡z øÕfð2ÿ…­Ð°š`%Fº‰ ”ñgVÄëšW9hÑ~5aòÈ<`¹D.àw7c¸'˜·?|®™£NœÌÑÓÕ›M =³ù€ÇD­ü¤ešÂwÍÊS*jØfº]Š@û\ïß«SŠ'…Sã´lïL};—ee Yy1ÞÞö¶·G"‚àúÅ«žÂŽÒ–°íYqü‚:L]¿3éÄvƝ.;á,%éìõ´±Ç®5°ûÓ¸c£Ÿ´·³8qÇ7â¶qTÄeù.L(ëÄ¡ëƒu™ù0l7«µI§¿¯ÍñÏ(ˆ`2;£Î®lŠ÷{½FWlQKÒqgù;©¢¾*÷ÿGM±Ï}'Liag·qTÆxž¤¬
®=°ù„UhM­ëμ3u€O䙟8¨H0‚ïì(«ueЦ£Î€wJ!W#™ yXÂ} kC¢ÙÏ£9á܉šëa7D ®Îä1ù¨¡ñU´u䥸O&– }à¹Õ‚p~áµòoØÍ)øÑ˜`™qÅnpit4S©^C‚¢2À¥¦…× áMgGªÇ õfØ30õ``à¡r“Îr¯¡…±Ù$ ¡BãT²Ö¥³³$ |d
,Û•¹Piª¢(Ó”, U¨7 Þ‹ÎÀ8Íț.ÎvãÂIÍa—Ó@G6Ä‘ qå«¶N±x„à±^Tošö/rÄéÃT*}YVpY";d!¨ÐnïðÕË!X¼Á—ÆCœÀk:=Ãס\z#–Ì‘Hu]òåÓ_½|jVG¿‚ðÒ
;;*%ÀLHÍhn¡,òÊ)µr ¥†AhÙn½½T
¼ËL
äã^ãHÈ÷Ïÿþÿ÷?ÿ
Âüñ‡þ}©*B
Ex¨¤©[̦~Ç4º˜^×Î&h@…ѬѩürÞçš•i’ò8U*X¥Y4­ø§9Ío¥ùNgÏ#+l- êWÁrðó0ƒ¥V‘{ý²Mäe‹Xß×puÎ;çƒ^/¼¾P­žn¥!L»2¯¹¿sÑžâb%‹3ÙIj÷Ó¸¢Âò§Ï6à†Þÿ8¦øJŸ2ÇMAa™—,©JÒa-ÎVã]2üѲ²Ø
Ћܶ„|Ý׳„…¼LßÂÉÃ.—^!®«#Öï?[)¦õU†ê~HN„^*BDèÕ‹P˜œEo¥ño¦˜²¯µ½]¹ÒsºìãÐòË‚Î"¨^䔋¨@Çvâ¾c"™ˆ‡@5 9Z”©¢
#4T÷›÷×00ý|¼LñTŠÐ•8k¨$,ë܈²p¹är®„»4¸"¨£?ÿçSß x].J³RÍë¦ú'ä×ÔjFi³òÃù¬D¾¨Àþ¨R´ËRÔ‚£¡<
¤Sy|Ùr¤"…*\ËõŽù2r3Ä+úÃôÞ»TnwHä«2)N·Ì>Z¯¸s]a‹TW^é§‘½±í‰ë8ÌW}ûFðU.>w†ùÄFÑ0âŠ60’àñ¡;½¤CÖ²g©Y^‚w˜âÂüÁ.$¨ð'§˜2¶F2MW97Áè-X,*0iŰHt
ÒšHmõXksV’Áî5XæøÃŸ2u™ì”1—|NŒ–¤L pÞ©N+…øûrAÇSz «#KIÖh$¥À'ëÜ n°×^ЂÃ8œì²Ž¬ѾšabóJ’tw#ñüP¼dy‹±F³®:ˆÍ¥]–ü˜T–’C%`"ÀÕ&!Ií²ë{®ÏÀ6ö•öAé:¦úM¾²¹/¬æªà/Ùž¾X¥¥£œ\,T¸“Tû莒‰k`Y%URÙà!QÕª²›Å¤[Ê #¯™›¦Ù+…•©M?Wª()‚Üåº%<ù—2ËXýúE"/‚´T˸•=Ä8ðÍj­”¥®iKÒVð0èÿ[û&°í×ÖïµAo°ØåcŠKY}Ä3ýŸA¥®JuWÕ'(%­«ñ
VÕøDâ­QÁIÖòVfÿ¢üY+¤N¨q…Lò‘¢kRÞ×â<yšñâiÍr
ƒ`«²—ëy;¼*W]Ь.ãIʪâäÖ%?ª$YWXü‹Ôý%E¡uaÛ%­¬V-½Ÿ®XÈ×Ý©å3o³*¡‡_ÅÕÖÜ8{{Õ•6þ=ƒ=‹â ê„+iýñ‡ïÿK»r´%^X¸±ÕÐ,ÛÆýŸmª·ñoCÑö¦z>Ï¡hške—˜¨ÖÏüqúê↜büùý?jߪêfzÄîný'Ÿ‹âÒ\?0žíº#nÕ
Ëü‘Õä*òa„ ¾uæçúÅWY%2Á,ùùjÙ²D]SˆÇUµìŠÈ!ŸŸ¡k«åÈÍ
-l÷×–Âáy#cQ+×Yvyy¿ (æÒYg1ƒîa²ÛËç äÈU¯IzÒÌSßÕ–›Rˆ‚_ªÒ0‚{XaÂ_Ó$}B²Âr»Së’uÙÈ)Êç'MÖæ«¢Ú|+Æ{Ãè
h¿ÌöpåG5èÜ·%tp'6-kªÑêòü°
 ±´#±.FõÝ$Ï#Õ"ÖðHG>©¼‘g’—7ÖpÉW}6lòÚJžOQ[Yè84öirJ¥š«TÑ).N^ÓYÃ*? ÷épZØèB>”zÐf”S|ŸGåM®ÆÑg0Û*¼ãÂ5>¹´eUÜ[ãî­¢ZVíÒû£œvÒ×¢£àºÁ?`eŽ˜ÄŠÓi^kÝ|f§/ÓéXŸ ˜ qÛ»†*ŽJF<îü*+xÅ@3ûÀ1'¬pkrÃS )7ðýiìYˆÀJ!ææñØ~V4ºet¹I`y›˜2·^S*zÈ_Ù ö`s-[Ü©™Ÿ*–ÕH~¶¸ñ™‰;±e\5F®BÅ8«³•[«VUÖ²¾N»)S”nß9Ø„R„êójúg%#2Mù)%}ÖwxT¡bš%`yžÓ.W• ³b~~>0
®Ê*³O›NeeTÌ–A¿Ï¶RkòâÂ7¡µ+‹ÛÅÔ”Žä¶rDº.w#ÖŽ_Å‹ÌVpðYÍŠøþ³
n8ïó²Å¿ýAåaÉÕ®ÊÎþü–J9gr—vJºÕJUÕ_>>6Џø„LT.nI-Ô&QK–ª¯±OüŒ½·Ö<UN°ü’úîb­6&·¶MÙ§Þw`šäªºMºnðª‘og—ê°|ˆYºyR´{ƒÓ)¹J]åé”uf žüÈ¡qT<³_X5é¼øÈ=?ñgøX=¿åî2Ýõ{bg&‰ø»%Â=6Nø>*¯du“ÉZHìÜ4R¥c#H^,Ø”’í Ñan¨¸¢
 íl—OB7‘?јˆßhLýHÄ‚éª>„ÕÈÔj!~Íä1ÿ™„| 8á]'g·
OHfHKeß\¡òÛàÇ=ƒÛV~+_»Må7Wð-—{sªT¾ýñ‡ïÿô‘e[ú‘¢ÕU[NL9ŸïŠ™Yé­PâÕ¥Ûª_Ú´€›íiK¶q˜’Qʈr®b½º¢[Åú¦uÝφõš:oÍGmVíýl˜¯+þVq¿y øSd_Ôˆ üׄ«Øß¸,ü©pŸ¯KŽW•Ž«Ø¾]ù/ÇûQMXå8­¯’l]VÜW«ÈWCÎNW®«%ˉݰœ\5ÇkŠÊ¥°®\v}iy½®­74Ê©NîGêV$~B”Þæ `öSuµ  ŠôˆÁC, ëÂÄUGçòˆoçÖ_ÝŒ©’¨gÛk'8;Ⱦ
Dž,_ _$Ïp¯0’µß¥G ³ââÊCÐU§´o«ê¥ãÛ·=¼Í•>%=;·áñí»]¡…%E?·\QÛPO֦ϕ…¶¾î!¬As´úòGñË Ü0…ÊH~A/)µäU™SB «ÎA}Øqõhè]§_àéËoˆùø“>‡ÇaØ=j;=Cœx _Ý<sš:þ›:ýâFîŸ@HE@ÿÈÿè«2½xœMŽÁ
Â0Dï…þCÈY—¶(¯ž{ò.,É¢³)I¥ôßMš=î̼™êJÉhIž„´è£á;>÷ÊqDƒÜ-ù`çL
4«¬)(oƸZÆ‹sÁÅ€Œ7²ÄQ\>!]Af!ùT
m§Ô…dMùÎJL¥9ÊN“øå³=o_ŒÄšXú'é=z
Y‘×´=te$YÊù¢wÐñtÕÕüÀDK0±‚xœ­WmOã8þŽÄ˜•’êºée¡¨wÇò²×oG‘îÃ
IÜÖKbçlŽ«úßoœ—ÆiiÛÍ—4žñ33ÏŒg\_p¥þôAÒ¿&©ëäKNmsÃO•FùÈÅDOl¡ù¶Ä¾•½æ;
$ŽQž›tËW×(Øm6›©v£g,BúD$ÝÜÀm^¢¨kðÜšÙV¬äPÞw%¸;…EL÷Àé6£{
5ྤDÑ “ÃHH¸Çïm`SµŒ§4ÑÌwoo&9‰hŽ4¤ò‘B&„ ©‚‘ø‰””k@mêk!ŸË®nO§ÇŸ¡Ëû./ë€,qM|­n¢I‰EéáÕñÑñùõààtø
ФºÀH¨JŒ”Égf™ýKÁXHý6d"TqÇÔSzsÝ#奟jøÌ}wî~­ÓÍ
À'sŒe¨G±_ˆrqN¾•‹æ™ zЪƒñ“ôUL8 1!§ OwFäÕŒq)žnô~ét[Ðjw`»»Ÿv÷P‰{ ¢íí~‚î6tÚ-”ш°ÞSþw_D1áϾQ! 1:B²Pkp+¡ð1£úl\@&$„ ÉP‰:7©/Z úDëXõ
æÅ’<bìÒóýF«ÛüEã~«EW)êö<j„g†„k¡Ê¸O'ܧ+£Þk®‰ºmExO¥ðëâ>ð}‘ðœéñŸ2u…TkíÏ„azßNIw#9#—4«’‹˜Ȩ̂՜´ÖpÒ±8‰$
¬£äŒ`h´ÈÃ
N†dŒ
âíñw:H@ÿÅEi<µ‘Vb5/ÎgAd`~ü!°;=PçÛWó•J®¤rMz+kEÈ™•Ù~öÆ6ñ$™¦'HµSÔáëðâ[¨DgÙèÙµZ&= Ã:´Ó.^tR/c×9Ä>­±Oç;Ê~ÕC—ÊV„[gys;œPÿÁt³Åþ—õ4õbS[lªÕÞf¼¡R
é:\οô–ѹ0s$áÁg1|ïehf'F"é2S(è Êñ$”Èe&D=ÇŽö Õ6 ¸f”ô>‘ëZ6ÇÆT»NƒÄ¬a©".Îå:gUƒþ¯EÀÍYÍû]d¤:‘Ü §s3Qîvs»VÌ䔎Þò€*)4“z¿„œUf‰ªFÜÏŠ ONkt &˜—ࢫXƉí:5Þ¸™ºfÁòàññ'à¦NׯšÝcóc‰·=4•ší^°™SÓm6—¨9Á>…U¯E
h£YÔ -³ùL7…@Âì€,fݬ½1Ý¿A6Ã×kíuŒ ¥Ò`üSV7$x‰«²ãpx?}ïèˆæÝ‹ày¹Vœb«ð}¼öÐVB­ÞI§"?‡MeÈZÇægâ?$1PÄx'ÕàŠØL ìÞM%c?W YDÑZ„“oÞF¿¶Ä{¶þ®ÂÃbõrú8a¨[ó´ /†)õø%iŸºo=ï¦1Æ
þèØLdP™u“ÈU7ì»Låvk:7;Ki»[FËOÔëÇhM1•.ÕÁ>Yë
¦žMK;œÿ]BiòLe`?VFY%äP/–’)‡§å®ù;ˆu`ç¿rMè¿ö,Íd³í.ý÷†&áÜ„E4˜»^ÝÌ­)œ`)ö¶¦ÆöìîÅýGóÛlMç¹\¡|h
­bÏâ|zÃÖl›Í¯Lå—±ÞH¦à?H®äxœ;Átžq‚ÁĘùjç’ÿ¥£^À‡²ÝYt­¶Í’¹µ”{RIDX
 
’ÿ¥£^À‡²ÝYt­¶Í’¹µ”{.`ž®GÿÇýŒ³‚P}ÄÙYÍ“# pack-refs with: peeled fully-peeled sorted
7a0aa9e8697b8f129a16d206f815d3dff990513a refs/remotes/origin/main
7a0aa9e8697b8f129a16d206f815d3dff990513a
ref: refs/remotes/origin/main
{
"salt": "Mh7pQ2xR9nF8sT4vY3",
"frontend": {
"password": "Fwl2GDVUTDoBBXEBRm0MBhF3eCAE"
},
"backend": {
"username": "LAxaGT8=",
"password": "NBwEQwFWMGtuCQd/IWFOQgp1CQ4B"
}
}version: '3.8'
services:
martinhal-contacts:
build: .
container_name: martinhal-contacts
ports:
- "8000:8000"
volumes:
- contacts-data:/app/data
restart: unless-stopped
environment:
- NODE_ENV=production
volumes:
contacts-data:FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json ./
# Install dependencies
RUN npm install
# Copy application files
COPY index.html ./
COPY credentials.json ./
COPY server.js ./
# Create backups directory
RUN mkdir -p /app/backups
# Expose port
EXPOSE 8000
# Start the server
CMD ["npm", "start"]<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Martinhal Contacts</title>
<script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.31/jspdf.plugin.autotable.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
const{useState,useEffect}=React;
const encryptData=t=>btoa(t);
const decryptData=t=>{try{return atob(t)}catch{return null}};
const xorDecrypt=(s,k)=>{const d=atob(s);let r='';for(let i=0;i<d.length;i++)r+=String.fromCharCode(d.charCodeAt(i)^k.charCodeAt(i%k.length));return r};
function App(){
const[view,setView]=useState('front');
const[dark,setDark]=useState(false);
const[contacts,setContacts]=useState([]);
const[depts,setDepts]=useState([]);
const[locs,setLocs]=useState([]);
const[search,setSearch]=useState('');
const[filterLoc,setFilterLoc]=useState('All');
const[filterDept,setFilterDept]=useState('All');
const[auth,setAuth]=useState(false);
const[unlocked,setUnlocked]=useState(false);
const[frontPwd,setFrontPwd]=useState('');
const[user,setUser]=useState('');
const[pwd,setPwd]=useState('');
const[users,setUsers]=useState({});
const[editing,setEditing]=useState(null);
const[editDept,setEditDept]=useState(null);
const[editLoc,setEditLoc]=useState(null);
const[newDept,setNewDept]=useState('');
const[newLoc,setNewLoc]=useState('');
const[form,setForm]=useState({name:'',unit:'',phone:'',mobile:'',email:'',department:'',locations:[],photo:''});
const[loaded,setLoaded]=useState(false);
const[creds,setCreds]=useState(null);
useEffect(()=>{
fetch('./credentials.json')
.then(r=>{if(!r.ok)throw new Error('Not found');return r.json()})
.then(d=>{
setCreds(d);
setLoaded(true);
const u=xorDecrypt(d.backend.username,d.salt);
const p=xorDecrypt(d.backend.password,d.salt);
setUsers({[u]:{password:encryptData(p)}});
loadData();
})
.catch(e=>{console.error(e);alert('Error loading credentials')});
},[]);
const loadData=async()=>{
try{
const r=await fetch('/api/data');
if(r.ok){
const d=await r.json();
setContacts(d.contacts||[]);
setDepts(d.departments||['IT','Accounting','Board','Housekeeping','Maintenance']);
setLocs(d.locations||['Martinhal Oriente','Martinhal Lisbon','Martinhal Quinta','Martinhal Sagres']);
}
}catch(e){console.error(e)}
};
const saveData=async()=>{
try{
await fetch('/api/data',{
method:'POST',
headers:{'Content-Type':'application/json'},
body:JSON.stringify({contacts,departments:depts,locations:locs})
});
}catch(e){console.error(e)}
};
useEffect(()=>{
if(loaded&&contacts.length>=0){
saveData();
}
},[contacts,depts,locs]);
const checkFront=p=>{
if(!creds)return false;
return p===xorDecrypt(creds.frontend.password,creds.salt);
};
const doFrontLogin=()=>{
if(checkFront(frontPwd)){setUnlocked(true);setFrontPwd('')}
else{alert('Invalid password');setFrontPwd('')}
};
const doLogin=()=>{
if(users[user]){
if(decryptData(users[user].password)===pwd){setAuth(true);setPwd('')}
else alert('Invalid credentials')
}else alert('User not found')
};
const uploadPhoto=(e,isEdit)=>{
const f=e.target.files[0];
if(f){
const r=new FileReader();
r.onloadend=()=>{
if(isEdit)setEditing({...editing,photo:r.result});
else setForm({...form,photo:r.result});
};
r.readAsDataURL(f);
}
};
const addContact=()=>{if(form.name&&form.email){setContacts([...contacts,{...form,id:Date.now()}]);setForm({name:'',unit:'',phone:'',mobile:'',email:'',department:'',locations:[],photo:''})}};
const updateContact=()=>{setContacts(contacts.map(c=>c.id===editing.id?editing:c));setEditing(null)};
const delContact=id=>{if(confirm('Delete contact?'))setContacts(contacts.filter(c=>c.id!==id))};
const addDept=()=>{if(newDept&&!depts.includes(newDept)){setDepts([...depts,newDept]);setNewDept('')}};
const addLoc=()=>{if(newLoc&&!locs.includes(newLoc)){setLocs([...locs,newLoc]);setNewLoc('')}};
const updateDept=old=>{if(editDept&&editDept!==old){setDepts(depts.map(d=>d===old?editDept:d));setContacts(contacts.map(c=>({...c,department:c.department===old?editDept:c.department})))}setEditDept(null)};
const updateLoc=old=>{if(editLoc&&editLoc!==old){setLocs(locs.map(l=>l===old?editLoc:l));setContacts(contacts.map(c=>({...c,locations:c.locations.map(l=>l===old?editLoc:l)})))}setEditLoc(null)};
const delDept=d=>{if(confirm(`Delete ${d}?`)){setDepts(depts.filter(x=>x!==d));setContacts(contacts.map(c=>({...c,department:c.department===d?'':c.department})))}};
const delLoc=l=>{if(confirm(`Delete ${l}?`)){setLocs(locs.filter(x=>x!==l));setContacts(contacts.map(c=>({...c,locations:c.locations.filter(x=>x!==l)})))}};
const exportXLS=()=>{
const d=[['Name','Unit','Phone','Mobile','Email','Department','Locations']];
contacts.forEach(c=>d.push([c.name,c.unit,c.phone,c.mobile,c.email,c.department,c.locations.join(', ')]));
const wb=XLSX.utils.book_new();
const ws=XLSX.utils.aoa_to_sheet(d);
ws['!cols']=[{wch:20},{wch:15},{wch:18},{wch:18},{wch:30},{wch:15},{wch:40}];
XLSX.utils.book_append_sheet(wb,ws,"Contacts");
XLSX.writeFile(wb,`Contacts_${new Date().toISOString().split('T')[0]}.xlsx`);
};
const exportPDF=()=>{
const{jsPDF}=window.jspdf;
const doc=new jsPDF('l','mm','a4');
doc.setFontSize(18);
doc.text('Martinhal Contacts',14,15);
doc.setFontSize(10);
doc.text(`Exported: ${new Date().toLocaleDateString()}`,14,22);
const d=contacts.map(c=>[c.name,c.unit,c.phone,c.mobile,c.email,c.department,c.locations.join(', ')]);
doc.autoTable({
head:[['Name','Unit','Phone','Mobile','Email','Department','Locations']],
body:d,
startY:28,
styles:{fontSize:8,cellPadding:2},
headStyles:{fillColor:[102,126,234]},
columnStyles:{0:{cellWidth:35},1:{cellWidth:25},2:{cellWidth:30},3:{cellWidth:30},4:{cellWidth:50},5:{cellWidth:25},6:{cellWidth:'auto'}}
});
doc.save(`Contacts_${new Date().toISOString().split('T')[0]}.pdf`);
};
const downloadTemplate=()=>{
const data=[
['Name','Unit','Phone','Mobile','Email','Department','Locations'],
['John Doe','Marketing','+351 123 456 789','+351 987 654 321','john.doe@example.com','IT','Martinhal Oriente'],
['Jane Smith','Finance','+351 123 456 790','+351 987 654 322','jane.smith@example.com','Accounting','Martinhal Lisbon, Martinhal Quinta']
];
const wb=XLSX.utils.book_new();
const ws=XLSX.utils.aoa_to_sheet(data);
ws['!cols']=[{wch:20},{wch:15},{wch:18},{wch:18},{wch:30},{wch:15},{wch:40}];
XLSX.utils.book_append_sheet(wb,ws,"Template");
XLSX.writeFile(wb,'Martinhal_Contacts_Template.xlsx');
};
const importFromExcel=e=>{
const file=e.target.files[0];
if(!file)return;
const reader=new FileReader();
reader.onload=evt=>{
try{
const data=new Uint8Array(evt.target.result);
const workbook=XLSX.read(data,{type:'array'});
const sheet=workbook.Sheets[workbook.SheetNames[0]];
const rows=XLSX.utils.sheet_to_json(sheet,{header:1});
let imported=0;
let errors=0;
for(let i=1;i<rows.length;i++){
const row=rows[i];
if(!row[0]||!row[4])continue;
const newContact={
id:Date.now()+i,
name:row[0]||'',
unit:row[1]||'',
phone:row[2]||'',
mobile:row[3]||'',
email:row[4]||'',
department:row[5]||'',
locations:row[6]?row[6].split(',').map(l=>l.trim()).filter(l=>locs.includes(l)):[],
photo:''
};
const exists=contacts.find(c=>c.email.toLowerCase()===newContact.email.toLowerCase());
if(!exists){
setContacts(prev=>[...prev,newContact]);
imported++;
}else{
errors++;
}
}
alert(`Import complete!\nImported: ${imported} contacts\nSkipped (duplicates): ${errors}`);
}catch(err){
alert('Error reading file. Please use the template format.');
console.error(err);
}
};
reader.readAsArrayBuffer(file);
e.target.value='';
};
const filtered=contacts.filter(c=>{
const s=(c.name+c.email+c.unit).toLowerCase().includes(search.toLowerCase());
const l=filterLoc==='All'||c.locations.includes(filterLoc);
const d=filterDept==='All'||c.department===filterDept;
return s&&l&&d;
});
if(!loaded)return<div className="min-h-screen bg-purple-50 flex items-center justify-center"><div className="animate-spin rounded-full h-16 w-16 border-b-4 border-purple-600"/></div>;
if(view==='front'){
if(!unlocked)return(
<div className="min-h-screen bg-purple-50 flex items-center justify-center p-4">
<div className="bg-white p-8 rounded-2xl shadow-xl max-w-md w-full">
<h2 className="text-3xl font-bold text-purple-600 mb-2 text-center">Martinhal Contacts</h2>
<p className="text-gray-600 mb-6 text-center">Enter password</p>
<input type="password" value={frontPwd} onChange={e=>setFrontPwd(e.target.value)} onKeyPress={e=>e.key==='Enter'&&doFrontLogin()} className="w-full px-4 py-3 border-2 rounded-xl mb-4 focus:ring-2 focus:ring-purple-500" placeholder="Password"/>
<button onClick={doFrontLogin} className="w-full bg-purple-600 text-white py-3 rounded-xl hover:bg-purple-700 font-semibold">Access</button>
</div>
</div>
);
return(
<div className={dark?'min-h-screen bg-gray-900 text-white':'min-h-screen bg-purple-50'}>
<div className={dark?'bg-gray-800 p-6 shadow-lg':'bg-purple-600 text-white p-6 shadow-lg'}>
<div className="max-w-7xl mx-auto flex justify-between items-center">
<h1 className="text-3xl font-bold">Martinhal Contacts</h1>
<div className="flex gap-3">
<button onClick={()=>setDark(!dark)} className="px-4 py-2 bg-white bg-opacity-20 rounded-lg hover:bg-opacity-30">{dark?'☀ï¸':'🌙'}</button>
<button onClick={()=>setView('admin')} className="px-4 py-2 bg-white bg-opacity-20 rounded-lg hover:bg-opacity-30">Admin</button>
</div>
</div>
</div>
<div className="max-w-7xl mx-auto p-6">
<div className={dark?'bg-gray-800 p-6 rounded-xl mb-6':'bg-white p-6 rounded-xl shadow-lg mb-6'}>
<div className="flex flex-col gap-4">
<div className="flex gap-4 flex-wrap">
<input type="text" placeholder="Search..." value={search} onChange={e=>setSearch(e.target.value)} className={dark?'flex-1 min-w-[200px] px-4 py-3 bg-gray-700 border border-gray-600 rounded-lg text-white':'flex-1 min-w-[200px] px-4 py-3 border-2 rounded-lg'}/>
<select value={filterDept} onChange={e=>setFilterDept(e.target.value)} className={dark?'px-6 py-3 bg-gray-700 border border-gray-600 rounded-lg text-white font-medium':'px-6 py-3 border-2 rounded-lg font-medium'}>
<option value="All">All Departments</option>
{depts.map(d=><option key={d} value={d}>{d}</option>)}
</select>
<select value={filterLoc} onChange={e=>setFilterLoc(e.target.value)} className={dark?'px-6 py-3 bg-gray-700 border border-gray-600 rounded-lg text-white font-medium':'px-6 py-3 border-2 rounded-lg font-medium'}>
<option value="All">All Locations</option>
{locs.map(l=><option key={l} value={l}>{l}</option>)}
</select>
</div>
{(filterLoc!=='All'||filterDept!=='All')&&<div className="flex items-center gap-2 flex-wrap"><span className={dark?'text-gray-300':'text-gray-600'}>Active filters:</span>{filterDept!=='All'&&<span className="bg-purple-500 text-white px-3 py-1 rounded-full text-sm font-medium flex items-center gap-2">{filterDept}<button onClick={()=>setFilterDept('All')} className="hover:text-red-200">✕</button></span>}{filterLoc!=='All'&&<span className="bg-blue-500 text-white px-3 py-1 rounded-full text-sm font-medium flex items-center gap-2">{filterLoc}<button onClick={()=>setFilterLoc('All')} className="hover:text-red-200">✕</button></span>}<button onClick={()=>{setFilterLoc('All');setFilterDept('All')}} className="text-red-500 hover:text-red-700 font-bold ml-2">Clear All</button></div>}
</div>
</div>
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{filtered.map(c=>(
<div key={c.id} className={dark?'bg-gray-800 rounded-xl shadow-lg overflow-hidden':'bg-white rounded-xl shadow-lg overflow-hidden'}>
<div className="bg-purple-600 p-6 text-center text-white">
{c.photo?<img src={c.photo} alt={c.name} className="w-24 h-24 rounded-full mx-auto border-4 border-white object-cover"/>:<div className="w-24 h-24 rounded-full bg-white bg-opacity-20 mx-auto border-4 border-white flex items-center justify-center text-4xl">👤</div>}
<h3 className="text-xl font-bold mt-4">{c.name}</h3>
<p className="text-purple-100 text-sm">{c.unit}</p>
</div>
<div className="p-6 space-y-2">
<p className={dark?'text-gray-300':''}><strong className="text-purple-600">Phone:</strong> {c.phone}</p>
<p className={dark?'text-gray-300':''}><strong className="text-purple-600">Mobile:</strong> {c.mobile}</p>
<p className={dark?'text-gray-300':'break-all'}><strong className="text-purple-600">Email:</strong> {c.email}</p>
<div className="pt-2 border-t">
<span className="inline-block bg-purple-500 text-white px-3 py-1 rounded-full text-xs mb-2">{c.department}</span>
<div className="flex flex-wrap gap-1">
{c.locations.map(l=><span key={l} className="bg-blue-100 text-blue-800 px-2 py-1 rounded text-xs">{l}</span>)}
</div>
</div>
</div>
</div>
))}
</div>
{filtered.length===0&&<div className={dark?'bg-gray-800 p-12 rounded-xl text-center text-gray-400':'bg-white p-12 rounded-xl shadow-lg text-center text-gray-500'}>No contacts found</div>}
</div>
<footer className={dark?'text-center py-6 text-gray-400':'text-center py-6 text-gray-600'}>© Joao Vaz 2026</footer>
</div>
);
}
if(!auth)return(
<div className="min-h-screen bg-purple-50 flex items-center justify-center p-4">
<div className="bg-white p-8 rounded-2xl shadow-xl max-w-md w-full">
<div className="flex justify-between items-center mb-6">
<h2 className="text-2xl font-bold text-purple-600">Admin Login</h2>
<button onClick={()=>setView('front')} className="text-gray-500 hover:text-gray-700">✕</button>
</div>
<input type="text" placeholder="Username" value={user} onChange={e=>setUser(e.target.value)} className="w-full px-4 py-3 border-2 rounded-xl mb-3"/>
<input type="password" placeholder="Password" value={pwd} onChange={e=>setPwd(e.target.value)} onKeyPress={e=>e.key==='Enter'&&doLogin()} className="w-full px-4 py-3 border-2 rounded-xl mb-4"/>
<button onClick={doLogin} className="w-full bg-purple-600 text-white py-3 rounded-xl hover:bg-purple-700 font-semibold">Login</button>
</div>
</div>
);
return(
<div className={dark?'min-h-screen bg-gray-900 text-white':'min-h-screen bg-gray-50'}>
<div className="bg-green-600 text-white p-6 shadow-lg">
<div className="max-w-7xl mx-auto flex justify-between items-center">
<h1 className="text-3xl font-bold">Admin Panel</h1>
<div className="flex gap-3">
<label className="px-4 py-2 bg-green-700 rounded-lg hover:bg-green-800 cursor-pointer">
📥 Import Excel
<input type="file" accept=".xlsx,.xls" onChange={importFromExcel} className="hidden"/>
</label>
<button onClick={downloadTemplate} className="px-4 py-2 bg-green-700 rounded-lg hover:bg-green-800">📄 Template</button>
<button onClick={exportXLS} className="px-4 py-2 bg-green-700 rounded-lg hover:bg-green-800">📊 Export Excel</button>
<button onClick={exportPDF} className="px-4 py-2 bg-green-700 rounded-lg hover:bg-green-800">📄 PDF</button>
<button onClick={()=>setDark(!dark)} className="px-4 py-2 bg-green-700 rounded-lg hover:bg-green-800">{dark?'☀ï¸':'🌙'}</button>
<button onClick={()=>setView('front')} className="px-4 py-2 bg-green-700 rounded-lg hover:bg-green-800">View</button>
<button onClick={()=>{setAuth(false);setView('front')}} className="px-4 py-2 bg-green-700 rounded-lg hover:bg-green-800">Logout</button>
</div>
</div>
</div>
<div className="max-w-7xl mx-auto p-6">
<div className={dark?'bg-gray-800 p-6 rounded-lg mb-6':'bg-white p-6 rounded-lg shadow-lg mb-6'}>
<h2 className="text-xl font-bold mb-4">Add Contact</h2>
<div className="grid md:grid-cols-2 gap-4">
<div className="col-span-2 flex items-center gap-4">
{form.photo?<img src={form.photo} className="w-20 h-20 rounded-full object-cover"/>:<div className="w-20 h-20 rounded-full bg-gray-200 flex items-center justify-center text-3xl">👤</div>}
<label className="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 cursor-pointer">Upload Photo<input type="file" accept="image/*" onChange={e=>uploadPhoto(e,false)} className="hidden"/></label>
</div>
<input type="text" placeholder="Name *" value={form.name} onChange={e=>setForm({...form,name:e.target.value})} className={dark?'px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white':'px-4 py-2 border rounded-lg'}/>
<input type="text" placeholder="Unit" value={form.unit} onChange={e=>setForm({...form,unit:e.target.value})} className={dark?'px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white':'px-4 py-2 border rounded-lg'}/>
<input type="text" placeholder="Phone" value={form.phone} onChange={e=>setForm({...form,phone:e.target.value})} className={dark?'px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white':'px-4 py-2 border rounded-lg'}/>
<input type="text" placeholder="Mobile" value={form.mobile} onChange={e=>setForm({...form,mobile:e.target.value})} className={dark?'px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white':'px-4 py-2 border rounded-lg'}/>
<input type="email" placeholder="Email *" value={form.email} onChange={e=>setForm({...form,email:e.target.value})} className={dark?'px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white':'px-4 py-2 border rounded-lg'}/>
<select value={form.department} onChange={e=>setForm({...form,department:e.target.value})} className={dark?'px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white':'px-4 py-2 border rounded-lg'}>
<option value="">Select Department</option>
{depts.map(d=><option key={d} value={d}>{d}</option>)}
</select>
<div className="col-span-2 flex gap-2 flex-wrap">
{locs.map(l=><label key={l} className="flex items-center gap-1"><input type="checkbox" checked={form.locations.includes(l)} onChange={e=>setForm({...form,locations:e.target.checked?[...form.locations,l]:form.locations.filter(x=>x!==l)})}/>{l}</label>)}
</div>
</div>
<button onClick={addContact} className="mt-4 px-6 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700">Add Contact</button>
</div>
<div className="grid md:grid-cols-2 gap-6 mb-6">
<div className={dark?'bg-gray-800 p-6 rounded-lg':'bg-white p-6 rounded-lg shadow-lg'}>
<h2 className="text-xl font-bold mb-4">Departments</h2>
<div className="flex gap-2 mb-4">
<input type="text" placeholder="New department" value={newDept} onChange={e=>setNewDept(e.target.value)} className={dark?'flex-1 px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white':'flex-1 px-4 py-2 border rounded-lg'}/>
<button onClick={addDept} className="px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700">Add</button>
</div>
<div className="flex flex-wrap gap-2">
{depts.map(d=><div key={d} className="flex items-center gap-2 bg-purple-100 px-3 py-2 rounded-lg">{editDept===d?<><input type="text" value={editDept} onChange={e=>setEditDept(e.target.value)} className="px-2 py-1 border rounded"/><button onClick={()=>updateDept(d)} className="text-green-600">✓</button><button onClick={()=>setEditDept(null)} className="text-gray-600">✕</button></>:<><span className="text-purple-800">{d}</span><button onClick={()=>setEditDept(d)} className="text-blue-600">✎</button><button onClick={()=>delDept(d)} className="text-red-600">🗑</button></>}</div>)}
</div>
</div>
<div className={dark?'bg-gray-800 p-6 rounded-lg':'bg-white p-6 rounded-lg shadow-lg'}>
<h2 className="text-xl font-bold mb-4">Locations</h2>
<div className="flex gap-2 mb-4">
<input type="text" placeholder="New location" value={newLoc} onChange={e=>setNewLoc(e.target.value)} className={dark?'flex-1 px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white':'flex-1 px-4 py-2 border rounded-lg'}/>
<button onClick={addLoc} className="px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700">Add</button>
</div>
<div className="flex flex-wrap gap-2">
{locs.map(l=><div key={l} className="flex items-center gap-2 bg-blue-100 px-3 py-2 rounded-lg">{editLoc===l?<><input type="text" value={editLoc} onChange={e=>setEditLoc(e.target.value)} className="px-2 py-1 border rounded"/><button onClick={()=>updateLoc(l)} className="text-green-600">✓</button><button onClick={()=>setEditLoc(null)} className="text-gray-600">✕</button></>:<><span className="text-blue-800">{l}</span><button onClick={()=>setEditLoc(l)} className="text-blue-600">✎</button><button onClick={()=>delLoc(l)} className="text-red-600">🗑</button></>}</div>)}
</div>
</div>
</div>
<div className={dark?'bg-gray-800 rounded-lg overflow-hidden':'bg-white rounded-lg shadow-lg overflow-hidden'}>
<h2 className="text-xl font-bold p-6 border-b">Contacts</h2>
<div className="overflow-x-auto">
<table className="w-full">
<thead className={dark?'bg-gray-700':'bg-gray-100'}>
<tr>
<th className="text-left p-4">Photo</th>
<th className="text-left p-4">Name</th>
<th className="text-left p-4">Unit</th>
<th className="text-left p-4">Phone</th>
<th className="text-left p-4">Mobile</th>
<th className="text-left p-4">Email</th>
<th className="text-left p-4">Dept</th>
<th className="text-left p-4">Locations</th>
<th className="text-left p-4">Actions</th>
</tr>
</thead>
<tbody>
{contacts.map(c=><tr key={c.id} className="border-b">{editing?.id===c.id?
<><td className="p-4"><div className="flex items-center gap-2">{editing.photo?<img src={editing.photo} className="w-12 h-12 rounded-full object-cover"/>:<div className="w-12 h-12 rounded-full bg-gray-200 flex items-center justify-center">👤</div>}<label className="text-blue-600 cursor-pointer">📤<input type="file" accept="image/*" onChange={e=>uploadPhoto(e,true)} className="hidden"/></label></div></td>
<td className="p-4"><input type="text" value={editing.name} onChange={e=>setEditing({...editing,name:e.target.value})} className={dark?'w-full px-2 py-1 bg-gray-700 border border-gray-600 rounded text-white':'w-full px-2 py-1 border rounded'}/></td>
<td className="p-4"><input type="text" value={editing.unit} onChange={e=>setEditing({...editing,unit:e.target.value})} className={dark?'w-full px-2 py-1 bg-gray-700 border border-gray-600 rounded text-white':'w-full px-2 py-1 border rounded'}/></td>
<td className="p-4"><input type="text" value={editing.phone} onChange={e=>setEditing({...editing,phone:e.target.value})} className={dark?'w-full px-2 py-1 bg-gray-700 border border-gray-600 rounded text-white':'w-full px-2 py-1 border rounded'}/></td>
<td className="p-4"><input type="text" value={editing.mobile} onChange={e=>setEditing({...editing,mobile:e.target.value})} className={dark?'w-full px-2 py-1 bg-gray-700 border border-gray-600 rounded text-white':'w-full px-2 py-1 border rounded'}/></td>
<td className="p-4"><input type="email" value={editing.email} onChange={e=>setEditing({...editing,email:e.target.value})} className={dark?'w-full px-2 py-1 bg-gray-700 border border-gray-600 rounded text-white':'w-full px-2 py-1 border rounded'}/></td>
<td className="p-4"><select value={editing.department} onChange={e=>setEditing({...editing,department:e.target.value})} className={dark?'w-full px-2 py-1 bg-gray-700 border border-gray-600 rounded text-white':'w-full px-2 py-1 border rounded'}><option value="">Select</option>{depts.map(d=><option key={d} value={d}>{d}</option>)}</select></td>
<td className="p-4"><div className="flex gap-1 flex-wrap">{locs.map(l=><label key={l} className="flex items-center gap-1 text-xs"><input type="checkbox" checked={editing.locations.includes(l)} onChange={e=>setEditing({...editing,locations:e.target.checked?[...editing.locations,l]:editing.locations.filter(x=>x!==l)})}/>{l}</label>)}</div></td>
<td className="p-4"><div className="flex gap-2"><button onClick={updateContact} className="text-green-600 text-xl">✓</button><button onClick={()=>setEditing(null)} className="text-gray-600 text-xl">✕</button></div></td></>
:
<><td className="p-4">{c.photo?<img src={c.photo} className="w-12 h-12 rounded-full object-cover"/>:<div className="w-12 h-12 rounded-full bg-gray-300 flex items-center justify-center">👤</div>}</td>
<td className="p-4 font-medium">{c.name}</td>
<td className="p-4">{c.unit}</td>
<td className="p-4">{c.phone}</td>
<td className="p-4">{c.mobile}</td>
<td className="p-4">{c.email}</td>
<td className="p-4"><span className="bg-purple-100 text-purple-800 px-2 py-1 rounded text-xs">{c.department}</span></td>
<td className="p-4"><div className="flex flex-wrap gap-1">{c.locations.map(l=><span key={l} className="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">{l}</span>)}</div></td>
<td className="p-4"><div className="flex gap-2"><button onClick={()=>setEditing({...c})} className="text-blue-600 hover:text-blue-800 text-xl">✎</button><button onClick={()=>delContact(c.id)} className="text-red-600 hover:text-red-800 text-xl">🗑</button></div></td></>
}</tr>)}
</tbody>
</table>
</div>
</div>
</div>
<footer className={dark?'text-center py-6 text-gray-400 bg-gray-900':'text-center py-6 text-gray-600'}>© Joao Vaz 2026</footer>
</div>
);
}
ReactDOM.render(<App/>,document.getElementById('root'));
</script>
</body>
</html>{
"name": "martinhal-contacts",
"version": "1.0.0",
"description": "Martinhal Contact Management System",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.18.2",
"cors": "^2.8.5"
}
}# Martinhal Contact Management System - Docker Setup
## 🳠Docker Installation (Recommended)
### Prerequisites
- Docker installed: https://docs.docker.com/get-docker/
- Docker Compose installed (usually comes with Docker Desktop)
### Quick Start with Docker
1. **Make sure you have all files in the same directory:**
```
martinhal-contacts/
├── Dockerfile
├── docker-compose.yml
├── .dockerignore
├── index.html
├── credentials.json
├── server.js
├── package.json
└── contacts_data.json (will be created automatically)
```
2. **Build and start the container:**
```bash
docker-compose up -d
```
3. **Access the application:**
Open your browser and go to: `http://localhost:8000`
4. **Stop the application:**
```bash
docker-compose down
```
5. **View logs:**
```bash
docker-compose logs -f
```
### Docker Commands Reference
**Start the application:**
```bash
docker-compose up -d
```
**Stop the application:**
```bash
docker-compose down
```
**Restart the application:**
```bash
docker-compose restart
```
**View logs:**
```bash
docker-compose logs -f martinhal-contacts
```
**Rebuild after code changes:**
```bash
docker-compose down
docker-compose build
docker-compose up -d
```
**Access container shell:**
```bash
docker exec -it martinhal-contacts sh
```
## 📦 Data Persistence
Docker volumes ensure your data persists:
- **contacts_data.json** - Your contact database (automatically backed up)
- **backups/** - Directory for backup files
Even if you delete and recreate containers, your data remains safe!
## 🔄 Updating the Application
1. Update your files (index.html, server.js, etc.)
2. Rebuild and restart:
```bash
docker-compose down
docker-compose build
docker-compose up -d
```
## 🔠Current Passwords
- **Frontend Password**: `ZaAhdf4h8k79598pHD5H3`
- **Backend Username**: `admin`
- **Backend Password**: `yt33PdH9WgAGR5z4SFDf6`
## 🛠 Troubleshooting
**Port 8000 already in use:**
Edit `docker-compose.yml` and change the port mapping:
```yaml
ports:
- "3000:8000" # Access via http://localhost:3000
```
**Container won't start:**
```bash
docker-compose logs martinhal-contacts
```
**Remove everything and start fresh:**
```bash
docker-compose down
docker system prune -a
docker-compose up -d
```
## 📋 Alternative: Manual Setup (No Docker)
If you don't want to use Docker:
### Step 1: Install Node.js
Download from: https://nodejs.org/
### Step 2: Install Dependencies
```bash
npm install
```
### Step 3: Start Server
```bash
npm start
```
### Step 4: Open Browser
```
http://localhost:8000
```
## 🎯 Production Deployment
For production deployment with Docker:
1. **Use environment variables for sensitive data**
2. **Set up HTTPS with reverse proxy (nginx)**
3. **Configure automated backups**
4. **Set resource limits in docker-compose.yml**
Example production docker-compose.yml:
```yaml
version: '3.8'
services:
martinhal-contacts:
build: .
container_name: martinhal-contacts
ports:
- "8000:8000"
volumes:
- ./contacts_data.json:/app/contacts_data.json
- ./backups:/app/backups
restart: always
environment:
- NODE_ENV=production
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
```
## ✅ Benefits of Docker
- ✅ **Consistent environment** - Works the same everywhere
- ✅ **Easy deployment** - One command to start
- ✅ **Isolated** - Doesn't interfere with other apps
- ✅ **Easy updates** - Rebuild and restart
- ✅ **Data persistence** - Your data is safe
- ✅ **Easy backups** - Just copy the volume
That's it! Your Martinhal Contact Management System is now running in Docker! 🎉const express = require('express');
const fs = require('fs');
const path = require('path');
const cors = require('cors');
const app = express();
const PORT = 8000;
// Middleware
app.use(cors());
app.use(express.json({ limit: '50mb' })); // Increased limit for base64 images
app.use(express.static(__dirname)); // Serve static files from current directory
const DATA_FILE = path.join(__dirname, 'contacts_data.json');
const CREDENTIALS_FILE = path.join(__dirname, 'credentials.json');
// Initialize data file if it doesn't exist
if (!fs.existsSync(DATA_FILE)) {
const initialData = {
contacts: [
{ id: 1, name: 'John Smith', unit: 'Marketing', phone: '+351 123 456 789', mobile: '+351 987 654 321', email: 'john.smith@company.com', department: 'IT', locations: ['Martinhal Oriente'], photo: 'https://i.pravatar.cc/150?img=12' },
{ id: 2, name: 'Maria Santos', unit: 'Finance', phone: '+351 123 456 790', mobile: '+351 987 654 322', email: 'maria.santos@company.com', department: 'Accounting', locations: ['Martinhal Lisbon', 'Martinhal Quinta'], photo: 'https://i.pravatar.cc/150?img=5' },
{ id: 3, name: 'Pedro Costa', unit: 'Operations', phone: '+351 123 456 791', mobile: '+351 987 654 323', email: 'pedro.costa@company.com', department: 'Maintenance', locations: ['Martinhal Sagres'], photo: 'https://i.pravatar.cc/150?img=33' }
],
departments: ['IT', 'Accounting', 'Board', 'Housekeeping', 'Maintenance'],
locations: ['Martinhal Oriente', 'Martinhal Lisbon', 'Martinhal Quinta', 'Martinhal Sagres']
};
fs.writeFileSync(DATA_FILE, JSON.stringify(initialData, null, 2));
console.log('Created initial data file:', DATA_FILE);
}
// Check if credentials.json exists
if (!fs.existsSync(CREDENTIALS_FILE)) {
console.error('WARNING: credentials.json not found!');
console.error('Please make sure credentials.json is in the same directory as server.js');