### Instruction:
Create a full-stack JavaScript/TypeScript application using React and Node.js that connects to a MongoDB database. The application should allow users to create, read, update, and delete items from a shopping list. Additionally, implement user authentication and authorization using JWT tokens.

### Response:

To create a full-stack JavaScript/TypeScript application using React, Node.js, and MongoDB, follow these steps:

1. Set up the project structure

Create a new directory for your project and navigate to it in your terminal.

```
mkdir shopping-list-app
cd shopping-list-app
```

Inside this directory, create two folders: one for the client-side (React) and another for the server-side (Node.js).

```
mkdir client
mkdir server
```

2. Set up the server-side with Node.js and Express

Navigate to the `server` folder and initialize a new Node.js project.

```
cd server
npm init -y
```

Install necessary dependencies:

```
npm install express mongoose cors dotenv jsonwebtoken bcryptjs
npm install --save-dev typescript ts-node @types/node @types/express @types/mongoose @types/cors @types/jsonwebtoken @types/bcryptjs
```

Create a `tsconfig.json` file in the `server` folder with the following content:

```json
{
  "compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "outDir": "./dist",
    "strict": true,
    "esModuleInterop": true
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules"]
}
```

Create a `src` folder inside the `server` folder and add an `index.ts` file with the following content:

```typescript
import express from 'express';
import cors from 'cors';
import dotenv from 'dotenv';

dotenv.config();

const app = express();
app.use(cors());
app.use(express.json());

const PORT = process.env.PORT || 5000;

app.listen(PORT, () => {
  console.log(`Server is running on port ${PORT}`);
});
```

Add the following scripts to the `package.json` file in the `server` folder:

```json
"scripts": {
  "start": "ts-node src/index.ts",
  "build": "tsc",
  "serve": "node dist/index.js"
}
```

3. Set up MongoDB with Mongoose

Create a `.env` file in the `server` folder and add your MongoDB connection string:

```
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/database-name?retryWrites=true&w=majority
JWT_SECRET=your_jwt_secret_key
```

Replace `<username>`, `<password>`, and `database-name` with your actual credentials.

Update the `index.ts` file to connect to MongoDB using Mongoose:

```typescript
import express from 'express';
import cors from 'cors';
import dotenv from 'dotenv';
import mongoose from 'mongoose';

dotenv.config();

const app = express();
app.use(cors());
app.use(express.json());

// Connect to MongoDB
mongoose.connect(process.env.MONGODB_URI as string, { useNewUrlParser: true, useUnifiedTopology: true });
mongoose.connection.once('open', () => {
  console.log('Connected to MongoDB');
});

const PORT = process.env.PORT || 5000;

app.listen(PORT, () => {
  console.log(`Server is running on port ${PORT}`);
});
```

4. Create models, routes, and controllers for the shopping list items and user authentication

In the `src` folder, create three new folders: `models`, `routes`, and `controllers`. Inside each of these folders, create TypeScript files for the shopping list items and user authentication:

- `models/itemModel.ts`
- `models/userModel.ts`
- `routes/itemRoutes.ts`
- `routes/userRoutes.ts`
- `controllers/itemController.ts`
- `controllers/userController.ts`

Implement the necessary CRUD operations and JWT-based authentication in these files.

5. Set up the client-side with React

Navigate to the `client` folder and create a new React app using Create React App:

```
cd ../client
npx create-react-app . --template typescript
```

Install necessary dependencies for state management and API calls:

```
npm install axios react-query
```

6. Implement the shopping list UI and connect it to the server

Create components for displaying, adding, updating, and deleting items in the shopping list. Use Axios and React Query to make API calls to your Node.js server.

7. Implement user authentication

Create components for login and registration forms. Connect these components to your Node.js server using Axios and store JWT tokens in local storage or cookies.

8. Test your application

Run both the server and client applications and test all CRUD operations and user authentication features.

To run the server:

```
cd server
npm start
```

To run the client:

```
cd client
npm start
```

Now you have a full-stack JavaScript/TypeScript application using React, Node.js, and MongoDB that allows users to create, read, update, and delete items from a shopping list while implementing user authentication and authorization using JWT tokens.