Skip to content

Repository files navigation

AR-archaeology-server

This contains the backend for Sharing the Past and an admin panel that allows Ararat Plain Southeast Archaeological Project (APSAP) team members to manage the app.

👀 Overview of Admin Panel

Create and manage content with data validation to share with all app users

add

Sort and filter data with the search bar and intuitive table UI

sort_filter

Attach images and 3D models to make the content more attractive

media

Edit table headers for search convenience

header_customize

🚀 Run locally

  1. Clone this project to your local environment

    git clone "https://github.com/Humen-debug/XR-archaeology-server.git"
  2. Configure the yarn setting of ignore-engines to be true, if the version of yarn is 1.

    yarn preinstall

Important

Make sure you have MongoDB and mongosh installed on your machine

  1. Create a MongoDB instance on the local host

    yarn devMongo
  2. Start mongosh command

    mongosh

Important

If it is your first time to initiate a MongoDB for the server, run

rs.initiate()
  1. (Optional) Create an admin

    yarn admin
  2. Start the test servers. By default, the servers for admins and app users will be listening on http://localhost:3001 and http://localhost:3002 respectively

    yarn server:start
  3. Start the front-end admin panel. By default, the website will be running on http://localhost:3000

    yarn dev

Tip

If you want to expose your servers to the internet such that the application can access your data, run

yarn public
Server URL
Public (app users) server https://tests-server.serveo.net/
Internal (admins) server https://admin-tests-server.serveo.net/
Front-end CMS https://apsap-tests-server.serveo.net

🐳 Docker

Details

Log on using credentials set in .env (ME_CONFIG_BASICAUTH_USERNAME, ME_CONFIG_BASICAUTH_PASSWORD)

To initialize the docker container

  1. Create the Mongodb container and start running the server
yarn build
  1. Log on to Mongo Express and go to http://localhost:8081/

To run the docker container

yarn start
  1. Log on to Mongo Express and go to http://localhost:8081/

Development

📦 File Structures

Details
├── components: our customized UI components
├── config.json: website configuration settings
├── contexts: our React contexts/providers
├── layouts: wrappers of pages
├── pages: the content of different web pages
├── plugins: our customized plugins
├── public: static assets
├── server
│   ├── api
│   │   ├── public: APIs for the app users
│   │   └── services: APIs for the admin users of CMS
│   ├── db: database schema
│   ├── feathers: plugins for Feathers.js to automate CRUD operations and query APIs
│   └── utils
├── styles
└── types: declaration files

🧩 Built-with

Front-end

  • React - Frontend framework for creating reusable components
  • React-dom - Package serves as the entry point to the DOM for React
  • React-i18next - Internationalization framework for React and React Native
  • Next.js - React framework for the web
  • Tailwind CSS - Utility-first CSS framework

Back-end

  • Feathers.js - Framework for creating APIs and real-time application
  • Express.js - Node.js web application framework for building RESTful APIs
  • MongoDB - Open-source non-relational database
  • Mongoose - Library offering built-in type casting, validation, query building to model MongoDB data
  • Multer- Node.js middleware for handling multipart/form-data, which is primarily used for uploading files
  • Sharp - Library for Node.js image processing
  • Bcrypt.js - Library for hashing passwords securely
  • Moment.js - Parse, validate, manipulate and display dates and times
  • Lodash - Utility library for improving modularity and performance
  • Webpack - Module bundler to bundle files in a browser

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages