This guide walks you through everything needed to run TuKit locally and reach a live API endpoint. By the end you’ll have the server running against your own MongoDB instance, a registered and verified user account, and a valid JWT ready to authenticate subsequent requests.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/tukit/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Make sure the following are available on your machine before you begin:
- Node.js 18 or later — TuKit uses
performance.now()at startup and ES module syntax transpiled by Babel, both of which work reliably on Node 18+. - npm — bundled with Node.js; used to install dependencies and run scripts.
- MongoDB — either a local
mongodinstance or a free MongoDB Atlas cluster. You will need the full connection URI. - Google account credentials — a Gmail address with an App Password for Nodemailer, a Google Cloud Storage bucket name, and a Google OAuth 2.0 client ID and secret from Google Cloud Console (required even for local development if you want OAuth to work).
Clone the Repository and Install Dependencies
Clone the project from GitLab, move into the directory, and install all Node.js dependencies:
npm install pulls in both dependencies and devDependencies defined in package.json, including Express, Mongoose, Passport, Nodemailer, Sharp, and the Babel toolchain used by the dev script.Create Your .env File
TuKit reads all runtime configuration from environment variables via See the Configuration page for a full description of every variable.
dotenv. Create a file named .env in the project root (the same directory as package.json, not inside src/):Start the Development Server
Run the development server using Nodemon and Babel:Nodemon watches for file changes and restarts automatically. On a successful startup you’ll see output similar to:The server is now listening at
http://localhost:3000 and the MongoDB connection is initialised immediately after the port binding.Register Your First User
Send a On success the API creates the user record in MongoDB and sends a verification code to the provided email address via Nodemailer.
POST request to /api/user/register with your chosen credentials. The API accepts JSON:Verify Your Account
Check your inbox for the verification code sent by Nodemailer, then confirm the account:Replace
"12345" with the actual code from the email. A successful response activates the account so it can log in.Every protected route in TuKit validates the JWT through the Requests to protected routes that are missing the
Token middleware, which reads the header named token-access. Pass your JWT as that header on all subsequent requests:token-access header will receive a 403 Forbidden response. An invalid or expired token returns 401 Unauthorized.